aboutsummaryrefslogtreecommitdiff
path: root/src/examples/spdy_response_with_callback.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/examples/spdy_response_with_callback.c')
-rw-r--r--src/examples/spdy_response_with_callback.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/examples/spdy_response_with_callback.c b/src/examples/spdy_response_with_callback.c
index 21085c78..1a029a64 100644
--- a/src/examples/spdy_response_with_callback.c
+++ b/src/examples/spdy_response_with_callback.c
@@ -180,8 +180,6 @@ main (int argc, char *const *argv)
180 return 1; 180 return 1;
181 } 181 }
182 182
183 timeout.tv_usec = 0;
184
185 do 183 do
186 { 184 {
187 FD_ZERO(&read_fd_set); 185 FD_ZERO(&read_fd_set);
@@ -189,17 +187,15 @@ main (int argc, char *const *argv)
189 FD_ZERO(&except_fd_set); 187 FD_ZERO(&except_fd_set);
190 188
191 ret = SPDY_get_timeout(daemon, &timeoutlong); 189 ret = SPDY_get_timeout(daemon, &timeoutlong);
192 if(SPDY_NO == ret || timeoutlong > 1) 190 if(SPDY_NO == ret || timeoutlong > 1000)
193 { 191 {
194 //do sth else
195 //sleep(1);
196
197 //try new connection
198 timeout.tv_sec = 1; 192 timeout.tv_sec = 1;
193 timeout.tv_usec = 0;
199 } 194 }
200 else 195 else
201 { 196 {
202 timeout.tv_sec = timeoutlong; 197 timeout.tv_sec = timeoutlong / 1000;
198 timeout.tv_usec = (timeoutlong % 1000) * 1000;
203 } 199 }
204 200
205 maxfd = SPDY_get_fdset (daemon, 201 maxfd = SPDY_get_fdset (daemon,