We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1c7463b commit 52781d6Copy full SHA for 52781d6
1 file changed
crates/batcher/src/lib.rs
@@ -995,13 +995,18 @@ impl Batcher {
995
&mut user_guard,
996
);
997
998
- // Notify the evicted user
999
if let Some(ref removed_entry_ws) = removed.messaging_sink {
1000
- send_message(
1001
- removed_entry_ws.clone(),
1002
- SubmitProofResponseMessage::UnderpricedProof,
1003
- )
1004
- .await;
+ let ws_sink = removed_entry_ws.clone();
+ // Usually we just drop the locks, but this time
+ // We still need to keep them since we are doing more work
+ // So we send the message in an async manner
+ tokio::spawn(async move {
+ send_message(
1005
+ ws_sink,
1006
+ SubmitProofResponseMessage::UnderpricedProof,
1007
+ )
1008
+ .await;
1009
+ });
1010
}
1011
1012
evicted_entry = Some(removed);
0 commit comments