aboutsummaryrefslogtreecommitdiff
path: root/src/daemon/daemon.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/daemon/daemon.c')
-rw-r--r--src/daemon/daemon.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/daemon/daemon.c b/src/daemon/daemon.c
index 47c7c527..e09fdbc9 100644
--- a/src/daemon/daemon.c
+++ b/src/daemon/daemon.c
@@ -1219,14 +1219,15 @@ MHD_get_timeout (struct MHD_Daemon *daemon,
1219 while (pos != NULL) 1219 while (pos != NULL)
1220 { 1220 {
1221 if (0 != pos->connection_timeout) { 1221 if (0 != pos->connection_timeout) {
1222 have_timeout = MHD_YES; 1222 if (!have_timeout ||
1223 if (earliest_deadline > pos->last_activity + pos->connection_timeout) 1223 earliest_deadline > pos->last_activity + pos->connection_timeout)
1224 earliest_deadline = pos->last_activity + pos->connection_timeout; 1224 earliest_deadline = pos->last_activity + pos->connection_timeout;
1225#if HTTPS_SUPPORT 1225#if HTTPS_SUPPORT
1226 if ( (0 != (daemon->options & MHD_USE_SSL)) && 1226 if ( (0 != (daemon->options & MHD_USE_SSL)) &&
1227 (0 != gnutls_record_check_pending (pos->tls_session)) ) 1227 (0 != gnutls_record_check_pending (pos->tls_session)) )
1228 earliest_deadline = 0; 1228 earliest_deadline = 0;
1229#endif 1229#endif
1230 have_timeout = MHD_YES;
1230 } 1231 }
1231 pos = pos->next; 1232 pos = pos->next;
1232 } 1233 }