refactor(smtp/pool): remove duplicate abort_concurrent implementation (#1092)

This commit is contained in:
Paolo Barbolini
2025-05-24 16:37:54 +02:00
committed by GitHub
parent bfed19e6ad
commit c4df9730aa

View File

@@ -149,11 +149,7 @@ impl<E: Executor> Pool<E> {
pub(crate) async fn shutdown(&self) {
let connections = { self.connections.lock().await.take() };
if let Some(connections) = connections {
stream::iter(connections)
.for_each_concurrent(8, |conn| async move {
conn.unpark().abort().await;
})
.await;
abort_concurrent(connections.into_iter().map(ParkedConnection::unpark)).await;
}
if let Some(handle) = self.handle.get() {