mirror of
https://github.com/launchbadge/sqlx.git
synced 2025-12-29 21:00:54 +00:00
Do not attempt to reconnect on every Io error.
Io errors can describe a lot of things, when connecting to a database in general only ECONNREFUSED can be hoped to be resolved by waiting. Other errors will require user intervention
This commit is contained in:
parent
46f9f44d41
commit
9146929575
@ -247,7 +247,7 @@ impl<DB: Database> SharedPool<DB> {
|
||||
}
|
||||
|
||||
// an IO error while connecting is assumed to be the system starting up
|
||||
Ok(Err(Error::Io(_))) => Ok(None),
|
||||
Ok(Err(Error::Io(e))) if e.kind() == std::io::ErrorKind::ConnectionRefused => Ok(None),
|
||||
|
||||
// TODO: Handle other database "boot period"s
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user