Skip to content

Commit

Permalink
fix inf loop on sendmmsg error in prod
Browse files Browse the repository at this point in the history
  • Loading branch information
mafintosh committed Oct 12, 2023
1 parent 4494040 commit 1b4b8a2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/io_posix.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,9 @@ udx__on_writable (udx_socket_t *socket) {

int nsent = rc > 0 ? rc : 0;

assert(rc >= 0 || rc == UV_EAGAIN || rc == UV_ENOBUFS);
if (rs < 0 && rc != UV_EAGAIN && rc != UV_ENOBUFS) {
nsent = pkts; // something errored badly, assume all packets sent and lost
}

int unsent = pkts - nsent;

Expand Down

0 comments on commit 1b4b8a2

Please sign in to comment.