diff options
Diffstat (limited to 'src/daemon/connection.c')
-rw-r--r-- | src/daemon/connection.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/daemon/connection.c b/src/daemon/connection.c index acc48390..13c465b5 100644 --- a/src/daemon/connection.c +++ b/src/daemon/connection.c | |||
@@ -1786,7 +1786,7 @@ parse_connection_headers (struct MHD_Connection *connection) | |||
1786 | int | 1786 | int |
1787 | MHD_connection_handle_read (struct MHD_Connection *connection) | 1787 | MHD_connection_handle_read (struct MHD_Connection *connection) |
1788 | { | 1788 | { |
1789 | connection->last_activity = time (NULL); | 1789 | connection->last_activity = MHD_monotonic_time(); |
1790 | if (connection->state == MHD_CONNECTION_CLOSED) | 1790 | if (connection->state == MHD_CONNECTION_CLOSED) |
1791 | return MHD_YES; | 1791 | return MHD_YES; |
1792 | /* make sure "read" has a reasonable number of bytes | 1792 | /* make sure "read" has a reasonable number of bytes |
@@ -1851,7 +1851,7 @@ MHD_connection_handle_write (struct MHD_Connection *connection) | |||
1851 | { | 1851 | { |
1852 | struct MHD_Response *response; | 1852 | struct MHD_Response *response; |
1853 | int ret; | 1853 | int ret; |
1854 | connection->last_activity = time (NULL); | 1854 | connection->last_activity = MHD_monotonic_time(); |
1855 | while (1) | 1855 | while (1) |
1856 | { | 1856 | { |
1857 | #if DEBUG_STATES | 1857 | #if DEBUG_STATES |
@@ -2372,7 +2372,7 @@ MHD_connection_handle_idle (struct MHD_Connection *connection) | |||
2372 | } | 2372 | } |
2373 | timeout = connection->connection_timeout; | 2373 | timeout = connection->connection_timeout; |
2374 | if ( (timeout != 0) && | 2374 | if ( (timeout != 0) && |
2375 | (timeout <= (time (NULL) - connection->last_activity)) ) | 2375 | (timeout <= (MHD_monotonic_time() - connection->last_activity)) ) |
2376 | { | 2376 | { |
2377 | MHD_connection_close (connection, MHD_REQUEST_TERMINATED_TIMEOUT_REACHED); | 2377 | MHD_connection_close (connection, MHD_REQUEST_TERMINATED_TIMEOUT_REACHED); |
2378 | return MHD_YES; | 2378 | return MHD_YES; |