rust-server
rust-server copied to clipboard
Possible block on shutdown if a connected client never reads form an opened stream
When the gRPC server is shutdown, it closes all opened streams (events, units, ...) as follows:
- The stream waits for a) an item (event / unit update) to forward to the client b) a shutdown signal
- Whatever it receives first, is handled first
- If it receives an item, it is send to the client
It is possible that (1) is not run again until the client read the previous item from the stream from (3). If this theory holds true, it would be possible to block the server shutdown by establishing a connection but never reading items from it.