Skip to content

Commit 40e5883

Browse files
committed
remove specific IO error kind matching in PgListener::try_recv
1 parent 69bb595 commit 40e5883

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

sqlx-postgres/src/listener.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -283,15 +283,7 @@ impl PgListener {
283283

284284
// The connection is dead, ensure that it is dropped,
285285
// update self state, and loop to try again.
286-
Err(Error::Io(err))
287-
if matches!(
288-
err.kind(),
289-
io::ErrorKind::ConnectionAborted |
290-
io::ErrorKind::UnexpectedEof |
291-
// see ERRORS section in tcp(7) man page (https://man7.org/linux/man-pages/man7/tcp.7.html)
292-
io::ErrorKind::TimedOut |
293-
io::ErrorKind::BrokenPipe
294-
) =>
286+
Err(Error::Io(err)) =>
295287
{
296288
if let Some(mut conn) = self.connection.take() {
297289
self.buffer_tx = conn.inner.stream.notifications.take();

0 commit comments

Comments
 (0)