diff options
Diffstat (limited to 'src/examples/spdy_fileserver.c')
-rw-r--r-- | src/examples/spdy_fileserver.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/examples/spdy_fileserver.c b/src/examples/spdy_fileserver.c index eea0930e..f2b8f7b0 100644 --- a/src/examples/spdy_fileserver.c +++ b/src/examples/spdy_fileserver.c | |||
@@ -287,7 +287,6 @@ main (int argc, char *const *argv) | |||
287 | } | 287 | } |
288 | 288 | ||
289 | basedir = argv[3]; | 289 | basedir = argv[3]; |
290 | timeout.tv_usec = 0; | ||
291 | 290 | ||
292 | do | 291 | do |
293 | { | 292 | { |
@@ -296,17 +295,15 @@ main (int argc, char *const *argv) | |||
296 | FD_ZERO(&except_fd_set); | 295 | FD_ZERO(&except_fd_set); |
297 | 296 | ||
298 | ret = SPDY_get_timeout(daemon, &timeoutlong); | 297 | ret = SPDY_get_timeout(daemon, &timeoutlong); |
299 | if(SPDY_NO == ret || timeoutlong > 1) | 298 | if(SPDY_NO == ret || timeoutlong > 1000) |
300 | { | 299 | { |
301 | //do sth else | ||
302 | //sleep(1); | ||
303 | |||
304 | //try new connection | ||
305 | timeout.tv_sec = 1; | 300 | timeout.tv_sec = 1; |
301 | timeout.tv_usec = 0; | ||
306 | } | 302 | } |
307 | else | 303 | else |
308 | { | 304 | { |
309 | timeout.tv_sec = timeoutlong; | 305 | timeout.tv_sec = timeoutlong / 1000; |
306 | timeout.tv_usec = (timeoutlong % 1000) * 1000; | ||
310 | } | 307 | } |
311 | 308 | ||
312 | maxfd = SPDY_get_fdset (daemon, | 309 | maxfd = SPDY_get_fdset (daemon, |