On Tue, Feb 19, 2019 at 1:22 PM <rlwestl...@gmail.com> wrote:

> I've seen that thread before. But the thread doesn't seem to offer any
> solution that applies to my case besides tcpdrop (which again my code
> reviewer wants to avoid). I posted here in the hopes that Go has an easy
> way to simply kill all these connections.
>

Even if your Go program explicitly closes each connection before exiting it
wouldn't help. Go has no control over the connection entering the TIME_WAIT
state when it is closed. Yes, you could theoretically embed invocations of
the `tcpdrop` command in your app (or call whatever API that command
invokes) to short-circuit the TIME_WAIT and related states but that
solution is worse than the problem, IMHO. You'll either need to figure out
how to shutdown a jail environment with extant TCP connections or arrange
to run `tcpdrop` after your app has exited.

-- 
Kurtis Rader
Caretaker of the exceptional canines Junior and Hank

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to