postgres: Use current tracing span when dropping PgListener

This commit is contained in:
Chitoku
2025-03-04 18:51:33 +09:00
committed by Austin Bonander
parent c3fd645409
commit a92626d6cc
2 changed files with 4 additions and 3 deletions

View File

@@ -9,6 +9,7 @@ use futures_util::{FutureExt, StreamExt, TryFutureExt, TryStreamExt};
use sqlx_core::acquire::Acquire;
use sqlx_core::transaction::Transaction;
use sqlx_core::Either;
use tracing::Instrument;
use crate::describe::Describe;
use crate::error::Error;
@@ -366,7 +367,7 @@ impl Drop for PgListener {
};
// Unregister any listeners before returning the connection to the pool.
crate::rt::spawn(fut);
crate::rt::spawn(fut.in_current_span());
}
}
}