chiark
/
gitweb
/
~ianmdlvl
/
otter.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
191ca17
)
sse: Return from read() impl immediately after cv return
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sun, 11 Jul 2021 22:47:25 +0000
(23:47 +0100)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sat, 19 Mar 2022 16:01:02 +0000
(16:01 +0000)
This is going to make it easier to work with a condvar wait which
disposes of the mutex guard.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
daemon/sse.rs
patch
|
blob
|
history
diff --git
a/daemon/sse.rs
b/daemon/sse.rs
index 4e1dc387f047ab653e27eec19471c59feb841e9e..31dceaf9fb27959a88a85a7f61b62c910c8016f0 100644
(file)
--- 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")?; */
}