Skip to content

Commit

Permalink
Added a fix for properly reporting CONNRESET.
Browse files Browse the repository at this point in the history
  • Loading branch information
pkulchenko committed Nov 9, 2023
1 parent bef62ae commit e4451fa
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/wsocket.c
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ int socket_recv(p_socket ps, char *data, size_t count, size_t *got,
if (err != WSAEWOULDBLOCK) {
if (err != WSAECONNRESET || prev == WSAECONNRESET) return err;
prev = err;
continue;
}
if ((err = socket_waitfd(ps, WAITFD_R, tm)) != IO_DONE) return err;
}
Expand Down Expand Up @@ -291,6 +292,7 @@ int socket_recvfrom(p_socket ps, char *data, size_t count, size_t *got,
if (err != WSAEWOULDBLOCK) {
if (err != WSAECONNRESET || prev == WSAECONNRESET) return err;
prev = err;
continue;
}
if ((err = socket_waitfd(ps, WAITFD_R, tm)) != IO_DONE) return err;
}
Expand Down

0 comments on commit e4451fa

Please sign in to comment.