Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions sqlx-postgres/src/listener.rs
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,14 @@ impl PgListener {
// The connection is dead, ensure that it is dropped,
// update self state, and loop to try again.
Err(Error::Io(err))
if (err.kind() == io::ErrorKind::ConnectionAborted
|| err.kind() == io::ErrorKind::UnexpectedEof) =>
if matches!(
err.kind(),
io::ErrorKind::ConnectionAborted |
io::ErrorKind::UnexpectedEof |
// see ERRORS section in tcp(7) man page (https://man7.org/linux/man-pages/man7/tcp.7.html)
io::ErrorKind::TimedOut |
io::ErrorKind::BrokenPipe
) =>
{
if let Some(mut conn) = self.connection.take() {
self.buffer_tx = conn.inner.stream.notifications.take();
Expand Down
Loading