Closed ryanbrainard closed 9 years ago
@ryanbrainard I'd also recommend taking a look at @gwatts PR #22, that has this feature alongside with adding some additional tracking of connections.
@klizhentas Yeah, I noticed that after I submitted my PR. I'll close this in favor of PR #22.
If a persistent connection is before shutdown, the client will continue to be able to make requests to the server and block the shutdown because the
ConnState
never changes tohttp.StateClosed
. This disables keep-alives on the server during the shutdown routine, which is recommended in the net/http docs for servers in the process of shutting down.