ibmi: ensure that pipe backlog is not zero
On IBMi PASE, listen(pipe_fd, backlog=0) leads to "Connection refused" error PR-URL: https://github.com/libuv/libuv/pull/2641 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
This commit is contained in:
parent
ed1dc8537e
commit
1b045d464d
@ -95,8 +95,9 @@ int uv_pipe_listen(uv_pipe_t* handle, int backlog, uv_connection_cb cb) {
|
||||
if (uv__stream_fd(handle) == -1)
|
||||
return UV_EINVAL;
|
||||
|
||||
#if defined(__MVS__)
|
||||
#if defined(__MVS__) || defined(__PASE__)
|
||||
/* On zOS, backlog=0 has undefined behaviour */
|
||||
/* On IBMi PASE, backlog=0 leads to "Connection refused" error */
|
||||
if (backlog == 0)
|
||||
backlog = 1;
|
||||
else if (backlog < 0)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user