diff options
Diffstat (limited to 'src/daemon/daemon.c')
-rw-r--r-- | src/daemon/daemon.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/daemon/daemon.c b/src/daemon/daemon.c index 29d7cedf..451bb39a 100644 --- a/src/daemon/daemon.c +++ b/src/daemon/daemon.c | |||
@@ -546,7 +546,6 @@ MHD_get_fdset (struct MHD_Daemon *daemon, | |||
546 | return MHD_YES; | 546 | return MHD_YES; |
547 | } | 547 | } |
548 | 548 | ||
549 | |||
550 | /** | 549 | /** |
551 | * Main function of the thread that handles an individual | 550 | * Main function of the thread that handles an individual |
552 | * connection when MHD_USE_THREAD_PER_CONNECTION is set. | 551 | * connection when MHD_USE_THREAD_PER_CONNECTION is set. |
@@ -578,7 +577,7 @@ MHD_handle_connection (void *data) | |||
578 | tvp = NULL; | 577 | tvp = NULL; |
579 | if (timeout > 0) | 578 | if (timeout > 0) |
580 | { | 579 | { |
581 | now = time (NULL); | 580 | now = MHD_monotonic_time(); |
582 | if (now - con->last_activity > timeout) | 581 | if (now - con->last_activity > timeout) |
583 | tv.tv_sec = 0; | 582 | tv.tv_sec = 0; |
584 | else | 583 | else |
@@ -938,7 +937,7 @@ MHD_add_connection (struct MHD_Daemon *daemon, | |||
938 | connection->addr_len = addrlen; | 937 | connection->addr_len = addrlen; |
939 | connection->socket_fd = client_socket; | 938 | connection->socket_fd = client_socket; |
940 | connection->daemon = daemon; | 939 | connection->daemon = daemon; |
941 | connection->last_activity = time (NULL); | 940 | connection->last_activity = MHD_monotonic_time(); |
942 | 941 | ||
943 | /* set default connection handlers */ | 942 | /* set default connection handlers */ |
944 | MHD_set_http_callbacks_ (connection); | 943 | MHD_set_http_callbacks_ (connection); |
@@ -1252,7 +1251,7 @@ MHD_get_timeout (struct MHD_Daemon *daemon, | |||
1252 | } | 1251 | } |
1253 | if (!have_timeout) | 1252 | if (!have_timeout) |
1254 | return MHD_NO; | 1253 | return MHD_NO; |
1255 | now = time (NULL); | 1254 | now = MHD_monotonic_time(); |
1256 | if (earliest_deadline < now) | 1255 | if (earliest_deadline < now) |
1257 | *timeout = 0; | 1256 | *timeout = 0; |
1258 | else | 1257 | else |