mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-18 08:49:57 -04:00
Win32: avoid crash when waiting forever on zero fds.
This commit is contained in:
parent
be7a95c629
commit
160e58b67d
@ -298,7 +298,7 @@ win32_dispatch(struct event_base *base, struct timeval *tv)
|
|||||||
win32op->readset_out->fd_count : win32op->writeset_out->fd_count;
|
win32op->readset_out->fd_count : win32op->writeset_out->fd_count;
|
||||||
|
|
||||||
if (!fd_count) {
|
if (!fd_count) {
|
||||||
long msec = evutil_tv_to_msec(tv);
|
long msec = tv ? evutil_tv_to_msec(tv) : LONG_MAX;
|
||||||
/* Sleep's DWORD argument is unsigned long */
|
/* Sleep's DWORD argument is unsigned long */
|
||||||
if (msec < 0)
|
if (msec < 0)
|
||||||
msec = LONG_MAX;
|
msec = LONG_MAX;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user