tcpserver icon indicating copy to clipboard operation
tcpserver copied to clipboard

Shutdown 0 not waiting for active connection to complete

Open ngoyal16 opened this issue 3 years ago • 1 comments

We are trying to shutdown server with 0 and wait active connection to be terminate.

but as soon as Shutdown function get called the server is get terminated.

we should increment connWaitGroup using .Add(1) and once the connection terminate we should use .Done() function so that the connWaitGroup.wait() funciton wil be wait until the active connection(s) is closed.

ngoyal16 avatar Nov 10 '22 11:11 ngoyal16

@maurice2k https://github.com/maurice2k/tcpserver/pull/2

ngoyal16 avatar Nov 10 '22 11:11 ngoyal16