Skip to content

Commit 6189116

Browse files
committedApr 15, 2024
Move Imok reply to main IO loop in Downstairs
1 parent 080b250 commit 6189116

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed
 

‎downstairs/src/lib.rs

+5-6
Original file line numberDiff line numberDiff line change
@@ -1308,12 +1308,7 @@ where
13081308
return Ok(());
13091309
}
13101310
Some(Ok(msg)) => {
1311-
if matches!(msg, Message::Ruok) {
1312-
// Respond instantly to pings, don't wait.
1313-
if let Err(e) = resp_channel_tx.send(Message::Imok) {
1314-
bail!("Failed sending Imok: {}", e);
1315-
}
1316-
} else if let Err(e) = message_channel_tx.send(msg) {
1311+
if let Err(e) = message_channel_tx.send(msg) {
13171312
bail!("Failed sending message to proc_frame: {}", e);
13181313
}
13191314
}
@@ -2660,6 +2655,10 @@ impl Downstairs {
26602655
resp_tx.send(msg)?;
26612656
None
26622657
}
2658+
Message::Ruok => {
2659+
resp_tx.send(Message::Imok)?;
2660+
None
2661+
}
26632662
x => bail!("unexpected frame {:?}", x),
26642663
};
26652664
Ok(r)

0 commit comments

Comments
 (0)