Browse Source

Merge pull request #2623 from babarosaM33/master

udprelay: exclude udp remote_recv_sendto buff full
pull/2626/head
Max Lv 5 years ago
committed by GitHub
parent
commit
ac61025066
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions
  1. 4
      src/udprelay.c

4
src/udprelay.c

@ -880,7 +880,7 @@ remote_recv_cb(EV_P_ ev_io *w, int revents)
int s = sendto(src_fd, buf->data, buf->len, 0,
(struct sockaddr *)&remote_ctx->src_addr, remote_src_addr_len);
if (s == -1) {
if (s == -1 && !(errno == EAGAIN || errno == EWOULDBLOCK)) {
ERROR("[udp] remote_recv_sendto");
close(src_fd);
goto CLEAN_UP;
@ -891,7 +891,7 @@ remote_recv_cb(EV_P_ ev_io *w, int revents)
int s = sendto(server_ctx->fd, buf->data, buf->len, 0,
(struct sockaddr *)&remote_ctx->src_addr, remote_src_addr_len);
if (s == -1) {
if (s == -1 && !(errno == EAGAIN || errno == EWOULDBLOCK)) {
ERROR("[udp] remote_recv_sendto");
goto CLEAN_UP;
}

Loading…
Cancel
Save