We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fdd4663 commit 4590b9cCopy full SHA for 4590b9c
sqlx-postgres/src/listener.rs
@@ -279,8 +279,14 @@ impl PgListener {
279
// The connection is dead, ensure that it is dropped,
280
// update self state, and loop to try again.
281
Err(Error::Io(err))
282
- if (err.kind() == io::ErrorKind::ConnectionAborted
283
- || err.kind() == io::ErrorKind::UnexpectedEof) =>
+ if matches!(
+ err.kind(),
284
+ io::ErrorKind::ConnectionAborted |
285
+ io::ErrorKind::UnexpectedEof |
286
+ // see ERRORS section in tcp(7) man page (https://man7.org/linux/man-pages/man7/tcp.7.html)
287
+ io::ErrorKind::TimedOut |
288
+ io::ErrorKind::BrokenPipe
289
+ ) =>
290
{
291
if let Some(mut conn) = self.connection.take() {
292
self.buffer_tx = conn.inner.stream.notifications.take();
0 commit comments