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