Closed
Description
The graceful shutdown logic currently waits until all Service
s have dropped (i.e. all connections have closed). However, with keep-alive this is overconservative - what we'd really like is to wait until pending requests have finished.
This can't be correctly modeled with the current API, however. The last point in a request/response pair that user code is aware of is when it sends the last bit of the response body through the body channel. It will still take some amount of time for that bit to be written out over the network, so we can't immediately shut down after that's done.