diff options
Diffstat (limited to 'src/examples/spdy_event_loop.c')
-rw-r--r-- | src/examples/spdy_event_loop.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/src/examples/spdy_event_loop.c b/src/examples/spdy_event_loop.c index a716028f..e5e2a5b1 100644 --- a/src/examples/spdy_event_loop.c +++ b/src/examples/spdy_event_loop.c | |||
@@ -337,22 +337,17 @@ main (int argc, char *const *argv) | |||
337 | FD_ZERO(&except_fd_set); | 337 | FD_ZERO(&except_fd_set); |
338 | 338 | ||
339 | ret = SPDY_get_timeout(daemon, &timeoutlong); | 339 | ret = SPDY_get_timeout(daemon, &timeoutlong); |
340 | //printf("tout %i\n",timeoutlong); | 340 | if(SPDY_NO == ret || timeoutlong > 1000) |
341 | if(SPDY_NO == ret || timeoutlong > 1) | 341 | { |
342 | { | ||
343 | //do sth else | ||
344 | //sleep(1); | ||
345 | |||
346 | //try new connection | ||
347 | timeout.tv_sec = 1; | 342 | timeout.tv_sec = 1; |
348 | timeout.tv_usec = 0; | 343 | timeout.tv_usec = 0; |
349 | } | 344 | } |
350 | else | 345 | else |
351 | { | 346 | { |
352 | timeout.tv_sec = timeoutlong; | 347 | timeout.tv_sec = timeoutlong / 1000; |
353 | timeout.tv_usec = 0;//(timeoutlong % 1000) * 1000; | 348 | timeout.tv_usec = (timeoutlong % 1000) * 1000; |
354 | } | 349 | } |
355 | 350 | ||
356 | printf("ret=%i; timeoutlong=%i; sec=%i; usec=%i\n", ret, timeoutlong, timeout.tv_sec, timeout.tv_usec); | 351 | printf("ret=%i; timeoutlong=%i; sec=%i; usec=%i\n", ret, timeoutlong, timeout.tv_sec, timeout.tv_usec); |
357 | //raise(SIGINT); | 352 | //raise(SIGINT); |
358 | 353 | ||