aboutsummaryrefslogtreecommitdiff
path: root/src/unix/udp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/unix/udp.c')
-rw-r--r--src/unix/udp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/unix/udp.c b/src/unix/udp.c
index f6640fc7..c3e30314 100644
--- a/src/unix/udp.c
+++ b/src/unix/udp.c
@@ -793,7 +793,8 @@ int uv__udp_try_send(uv_udp_t* handle,
struct msghdr h;
ssize_t size;
- assert(nbufs > 0);
+ if (nbufs < 1)
+ return UV_EINVAL;
/* already sending a message */
if (handle->send_queue_count != 0)