Skip to content

Commit

Permalink
Change notify_waiters to notify_one on broken conns
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tneely authored and djc committed Oct 15, 2024
1 parent 8c40b13 commit 6204b0d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bb8/src/inner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
}
Expand Down

0 comments on commit 6204b0d

Please # to comment.