bonsaidb
bonsaidb copied to clipboard
Handle graceful shutdown properly
trafficstars
For both websocket and fabruic connections, we should have a shutdown handle that can be "selected" with each of the payload receivers, so that when a shutdown is requested, any existing requests for connections are handled.
- [x] Introduce a shared shutdown signaling mechanism
- [ ] #32
- [ ] Update all connection types to reject requests with a ShuttingDown error once a graceful shutdown phase has begun.
- [ ] Update all connection types to close their individual connections once a GracefulShutdown has begun and all outstanding requests have been serviced.
I've made some progress this morning in #27b065d, but functionally nothing has changed. Added a TODO list documenting the rest.