Log client disconnected on ring sse
This is only detected when ring sse attempts to send on the closed channel. It is not detected when the client actually disconnects. Lower layers in the stack do notice the disconnect and drop the sse stream so pings will stop being sent, but we don't have any drop handler on the ring substream so we don't notice until we try to use it.
This commit is contained in:
@@ -17,7 +17,7 @@ fn button_pressed(_level: Level, clients: &Arc<Mutex<SmallVec<[mpsc::Sender<()>;
|
||||
match tx.try_send(()) {
|
||||
Ok(_) => true,
|
||||
Err(mpsc::error::TrySendError::Full(_)) => true, // we just get some free debouncing
|
||||
Err(mpsc::error::TrySendError::Closed(_)) => false
|
||||
Err(mpsc::error::TrySendError::Closed(_)) => { info!("Event client disconnected"); false }
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user