diff options
Diffstat (limited to 'src/microhttpd/test_upgrade_common.c')
-rw-r--r-- | src/microhttpd/test_upgrade_common.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/microhttpd/test_upgrade_common.c b/src/microhttpd/test_upgrade_common.c index 68e40ad6..1b5a6470 100644 --- a/src/microhttpd/test_upgrade_common.c +++ b/src/microhttpd/test_upgrade_common.c | |||
@@ -482,6 +482,8 @@ run_mhd_select_loop (struct MHD_Daemon *daemon) | |||
482 | abort (); | 482 | abort (); |
483 | (void) MHD_get_timeout (daemon, | 483 | (void) MHD_get_timeout (daemon, |
484 | &to); | 484 | &to); |
485 | if (1000 < to) | ||
486 | to = 1000; | ||
485 | tv.tv_sec = to / 1000; | 487 | tv.tv_sec = to / 1000; |
486 | tv.tv_usec = 1000 * (to % 1000); | 488 | tv.tv_usec = 1000 * (to % 1000); |
487 | if (0 > MHD_SYS_select_ (max_fd + 1, | 489 | if (0 > MHD_SYS_select_ (max_fd + 1, |
@@ -537,6 +539,8 @@ run_mhd_epoll_loop (struct MHD_Daemon *daemon) | |||
537 | FD_SET (ep, &rs); | 539 | FD_SET (ep, &rs); |
538 | (void) MHD_get_timeout (daemon, | 540 | (void) MHD_get_timeout (daemon, |
539 | &to); | 541 | &to); |
542 | if (1000 < to) | ||
543 | to = 1000; | ||
540 | tv.tv_sec = to / 1000; | 544 | tv.tv_sec = to / 1000; |
541 | tv.tv_usec = 1000 * (to % 1000); | 545 | tv.tv_usec = 1000 * (to % 1000); |
542 | select (ep + 1, | 546 | select (ep + 1, |