From 8b0c09c73afc93ccce916183f01b90d892311602 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 11 Jul 2021 23:47:25 +0100 Subject: [PATCH] sse: Return from read() impl immediately after cv return This is going to make it easier to work with a condvar wait which disposes of the mutex guard. Signed-off-by: Ian Jackson --- daemon/sse.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/daemon/sse.rs b/daemon/sse.rs index 4e1dc387..31dceaf9 100644 --- a/daemon/sse.rs +++ b/daemon/sse.rs @@ -210,6 +210,8 @@ impl Read for UpdateReader { data: online {} {} G{}\n\n", self.player, self.client, ig.gs.gen)?; self.keepalives += Wrapping(1); + self.need_flush = true; + return Ok(buf.generated()); /* write!(buf,": keepalive\n\n")?; */ } -- 2.30.2