diff options
-rw-r--r-- | ext/socket/socket.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/ext/socket/socket.c b/ext/socket/socket.c index 38911c46d7..5f4fe6abe8 100644 --- a/ext/socket/socket.c +++ b/ext/socket/socket.c @@ -2785,9 +2785,8 @@ sock_accept_nonblock(sock) GetOpenFile(sock, fptr); rb_io_set_nonblock(fptr); fd2 = accept(fptr->fd, (struct sockaddr*)buf, &len); - if (fd2 < 0) { - rb_sys_fail(0); + rb_sys_fail("accept(2)"); } sock2 = init_sock(rb_obj_alloc(rb_cSocket), fd2); |