Skip to content

Commit

Permalink
fix: don't hold lock when sleeping (#620)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yin Guanhao authored Mar 22, 2022
1 parent 15e3b2a commit 20d9dce
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions crates/rpc-server/src/registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,7 @@ impl RequestSubmitter {
if !mem_pool.is_mem_txs_full(Self::MAX_BATCH_SIZE) {
break;
}
drop(mem_pool);
// sleep and try again
tokio::time::sleep(Self::INTERVAL_MS).await;
}
Expand Down

0 comments on commit 20d9dce

Please sign in to comment.