From 76f97b66eb1861dd45f02ab4d3e8c7a05d032eea Mon Sep 17 00:00:00 2001 From: Taylor Neely Date: Tue, 15 Oct 2024 20:03:34 +0000 Subject: [PATCH] Change notify_waiters to notify_one on broken conns When a connection is dropped but broken, we notify all waiting get requests that they should try again. This is done in order to ensure we have enough pending connections to serve all in- flight gets. Because only a single connection dropped however, we only need to notify one waiter to refresh, not all of them. --- bb8/src/inner.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bb8/src/inner.rs b/bb8/src/inner.rs index be2ef52..80e7922 100644 --- a/bb8/src/inner.rs +++ b/bb8/src/inner.rs @@ -158,7 +158,7 @@ where } let approvals = locked.dropped(1, &self.inner.statics); self.spawn_replenishing_approvals(approvals); - self.inner.notify.notify_waiters(); + self.inner.notify.notify_one(); } } }