diff --git a/daemon/session2.c b/daemon/session2.c index 0d1a69f50..6e16bffdd 100644 --- a/daemon/session2.c +++ b/daemon/session2.c @@ -1445,6 +1445,8 @@ static int session2_transport_pushv(struct session2 *s, } else { int ret = uv_udp_try_send((uv_udp_t*)handle, (uv_buf_t *)iov, iovcnt, comm->comm_addr); + if (ret > 0) // equals buffer size, only confuses us + ret = 0; if (ret == UV_EAGAIN) { ret = kr_error(ENOBUFS); session2_event(s, PROTOLAYER_EVENT_OS_BUFFER_FULL, NULL); @@ -1476,6 +1478,8 @@ static int session2_transport_pushv(struct session2 *s, ret = kr_error(ENOBUFS); session2_event(s, PROTOLAYER_EVENT_OS_BUFFER_FULL, NULL); } + else if (ret > 0) // iovec_sum was checked, let's not get confused anymore + ret = 0; if (false && ret == UV_EAGAIN) { uv_write_t *req = malloc(sizeof(*req));