aboutsummaryrefslogtreecommitdiff
path: root/src/examples/spdy_event_loop.c
diff options
context:
space:
mode:
authorAndrey Uzunov <andrey.uzunov@gmail.com>2013-07-17 14:46:49 +0000
committerAndrey Uzunov <andrey.uzunov@gmail.com>2013-07-17 14:46:49 +0000
commitb43954303929b9e3980805d51322db9f9046e7c4 (patch)
tree8e3c7ed8ff9b0f50afaf02bd5e566e6c1e50b739 /src/examples/spdy_event_loop.c
parent4231889ce35dd86cbd6a3872b3fcba053f1fd65c (diff)
downloadlibmicrohttpd-b43954303929b9e3980805d51322db9f9046e7c4.tar.gz
libmicrohttpd-b43954303929b9e3980805d51322db9f9046e7c4.zip
spdy: change SPDY_get_timeout to give not seconds but milliseconds as it used to be
Diffstat (limited to 'src/examples/spdy_event_loop.c')
-rw-r--r--src/examples/spdy_event_loop.c17
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