Lame-duck mode is not yet implemented
Opened this issue · 0 comments
Merovius commented
When the server is shutting down (by a cancelled context) it shouldn't just abort handling requests, but instead reply to them with ESHUTDOWN or NBD_REP_ERR_SHUTDOWN, until the client disconnects. This is unfortunate in that it means cancellation isn't immediate - if the client refuses to disconnect, Serve
would block forever. Maybe we need a secondary cancellation signal for that.
Likewise, if the client receives an ESHUTDOWN or NBD_REP_ERR_SHUTDOWN response at any point, it should send an Abort/Disconnect.
Relevant spec values:
- ESHUTDOWN
- NBD_REP_ERR_SHUTDOWN