aboutsummaryrefslogtreecommitdiff
path: root/src/microspdy/daemon.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/microspdy/daemon.c')
-rw-r--r--src/microspdy/daemon.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/microspdy/daemon.c b/src/microspdy/daemon.c
index 69469a9d..0556c253 100644
--- a/src/microspdy/daemon.c
+++ b/src/microspdy/daemon.c
@@ -134,7 +134,7 @@ spdyf_parse_options_va (struct SPDY_Daemon *daemon,
134 switch (opt) 134 switch (opt)
135 { 135 {
136 case SPDY_DAEMON_OPTION_SESSION_TIMEOUT: 136 case SPDY_DAEMON_OPTION_SESSION_TIMEOUT:
137 daemon->session_timeout = va_arg (valist, unsigned int); 137 daemon->session_timeout = va_arg (valist, unsigned int) * 1000;
138 break; 138 break;
139 case SPDY_DAEMON_OPTION_SOCK_ADDR: 139 case SPDY_DAEMON_OPTION_SOCK_ADDR:
140 daemon->address = va_arg (valist, struct sockaddr *); 140 daemon->address = va_arg (valist, struct sockaddr *);
@@ -390,8 +390,8 @@ int
390SPDYF_get_timeout (struct SPDY_Daemon *daemon, 390SPDYF_get_timeout (struct SPDY_Daemon *daemon,
391 unsigned long long *timeout) 391 unsigned long long *timeout)
392{ 392{
393 time_t earliest_deadline = 0; 393 unsigned long long earliest_deadline = 0;
394 time_t now; 394 unsigned long long now;
395 struct SPDY_Session *pos; 395 struct SPDY_Session *pos;
396 bool have_timeout; 396 bool have_timeout;
397 397
@@ -417,10 +417,9 @@ SPDYF_get_timeout (struct SPDY_Daemon *daemon,
417 417
418 if (!have_timeout) 418 if (!have_timeout)
419 return SPDY_NO; 419 return SPDY_NO;
420 if (earliest_deadline < now) 420 if (earliest_deadline <= now)
421 *timeout = 0; 421 *timeout = 0;
422 else 422 else
423 //*timeout = 1000 * (1 + earliest_deadline - now);
424 *timeout = earliest_deadline - now; 423 *timeout = earliest_deadline - now;
425 424
426 return SPDY_YES; 425 return SPDY_YES;