Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
increase correctness of open conn count (#738)
Currently, it appears that GetOpenConnectionsCount underreports the count by 1 after Shutdown has been called. This leads to a confusing value when servers are gracefully terminating. For instance, if a server is stuck in graceful termination, and there is one open connection keeping it alive, GetOpenConnectionsCount would report zero. This fix removes the decrement while the server is shutting down. It is not perfect due to the use of two sequential atomic loads, but in the common case it should return a more correct value overall.
- Loading branch information