chiark
/
gitweb
/
~ian
/
hippotat.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
a77d990
)
enforce tx queue expiry
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Wed, 4 Aug 2021 22:30:05 +0000
(23:30 +0100)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Wed, 4 Aug 2021 22:30:05 +0000
(23:30 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
src/bin/client.rs
patch
|
blob
|
history
diff --git
a/src/bin/client.rs
b/src/bin/client.rs
index a1cdce4eae485c0abcd619aaa9c85cbe0ccb9418..d82496e3c428e35af9f1262273f7d20874406d10 100644
(file)
--- a/
src/bin/client.rs
+++ b/
src/bin/client.rs
@@
-230,6
+230,15
@@
async fn run_client<C:HCC>(
let () = y.context("write rx data to ipif")?;
},
+ () = async {
+ let expires = tx_queue.front().unwrap().expires;
+ tokio::time::sleep_until(expires).await
+ },
+ if ! tx_queue.is_empty() =>
+ {
+ let _ = tx_queue.pop_front();
+ },
+
data = tx_stream.next_segment(),
if tx_queue.is_empty() =>
{