diff --git a/src/unix/os390.c b/src/unix/os390.c index dce169b9..458e7310 100644 --- a/src/unix/os390.c +++ b/src/unix/os390.c @@ -887,12 +887,13 @@ void uv__io_poll(uv_loop_t* loop, int timeout) { if (nfds == 0) { assert(timeout != -1); - if (timeout > 0) { - timeout = real_timeout - timeout; - continue; - } + if (timeout == 0) + return; - return; + /* We may have been inside the system call for longer than |timeout| + * milliseconds so we need to update the timestamp to avoid drift. + */ + goto update_timeout; } if (nfds == -1) {