diff --git a/src/conn/pool/recycler.rs b/src/conn/pool/recycler.rs index 2809dc0..4a83451 100644 --- a/src/conn/pool/recycler.rs +++ b/src/conn/pool/recycler.rs @@ -165,9 +165,12 @@ impl Future for Recycler { // if we've been asked to close, reclaim any idle connections if close || self.eof { - while let Some(IdlingConn { conn, .. }) = - self.inner.exchange.lock().unwrap().available.pop_front() - { + loop { + let Some(IdlingConn { conn, .. }) = + self.inner.exchange.lock().unwrap().available.pop_front() + else { + break; + }; assert!(conn.inner.pool.is_none()); conn_decision!(self, conn); }