Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/conn/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1032,7 +1032,7 @@ impl Conn {

pub async fn get_binlog_stream(mut self, request: BinlogRequest<'_>) -> Result<BinlogStream> {
// We'll disconnect this connection from a pool before requesting the binlog.
self.inner.pool = None;
self.inner.pool.take().map(|pool| pool.cancel_connection());
self.request_binlog(request).await?;

Ok(BinlogStream::new(self))
Expand Down
2 changes: 1 addition & 1 deletion src/conn/pool/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ impl Pool {
///
/// Decreases the exist counter since a broken or dropped connection should not count towards
/// the total.
fn cancel_connection(&self) {
pub(super) fn cancel_connection(&self) {
let mut exchange = self.inner.exchange.lock().unwrap();
exchange.exist -= 1;
// we just enabled the creation of a new connection!
Expand Down