Skip to content

Commit c1cae2d

Browse files
committed
sqlx pools immediately return ConnectionRefused errors
instead of hanging until the timeout and returning a PoolTimedOut error
1 parent f7ef1ed commit c1cae2d

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

sqlx-core/src/pool/inner.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -369,9 +369,6 @@ impl<DB: Database> PoolInner<DB> {
369369
}
370370
}
371371

372-
// an IO error while connecting is assumed to be the system starting up
373-
Ok(Err(Error::Io(e))) if e.kind() == std::io::ErrorKind::ConnectionRefused => (),
374-
375372
// We got a transient database error, retry.
376373
Ok(Err(Error::Database(error))) if error.is_transient_in_connect_phase() => (),
377374

0 commit comments

Comments
 (0)