rust-server icon indicating copy to clipboard operation
rust-server copied to clipboard

Possible block on shutdown if a connected client never reads form an opened stream

Open rkusa opened this issue 1 year ago • 0 comments

When the gRPC server is shutdown, it closes all opened streams (events, units, ...) as follows:

  1. The stream waits for a) an item (event / unit update) to forward to the client b) a shutdown signal
  2. Whatever it receives first, is handled first
  3. 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.

rkusa avatar Sep 08 '22 16:09 rkusa