Skip to content

Commit

Permalink
recycler: assert that reset queue is exhausted on eof
Browse files Browse the repository at this point in the history
  • Loading branch information
blackbeam committed Apr 13, 2023
1 parent 411a84a commit 8c4b72a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/conn/pool/recycler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,11 @@ impl Future for Recycler {
// races on .exist
let effectively_eof = close && self.inner.exchange.lock().unwrap().exist == 0;

if (self.eof || effectively_eof) && self.cleaning.is_empty() && self.discard.is_empty() {
if (self.eof || effectively_eof)
&& self.cleaning.is_empty()
&& self.discard.is_empty()
&& self.reset.is_empty()
{
// we know that all Pool handles have been dropped (self.dropped.poll returned None).

// if this assertion fails, where are the remaining connections?
Expand Down

0 comments on commit 8c4b72a

Please sign in to comment.