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:
Jakob Truelsen 2020-12-21 20:47:32 +01:00 committed by Austin Bonander
parent 46f9f44d41
commit 9146929575

View File

@ -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