Closed GoogleCodeExporter closed 9 years ago
Forget the question about the log window closing before getting a response from
the server :) I didn't see the icon that appears on the tray.
Original comment by makingar...@gmail.com
on 11 Mar 2012 at 7:55
I'm not sure it would be correct to set timeout to zero (infinite timeout),
because the code may block forewer if there is no internet connection. However,
I'll try to figure out what can be done here.
Original comment by zexspect...@gmail.com
on 12 Mar 2012 at 10:37
You are right of course. I'll have to check if setting only
INTERNET_OPTION_SEND_TIMEOUT to a high value (e.g. 5 - 10 minutes) would be
enough for this case. The other 2 timeout options shouldn't be relevant.
I haven't really used WinINet API before. This is probably a silly question,
but in the case where there's no internet connection at all, shouldn't it have
failed some places earlier (instead of HttpEndRequest())? E.g. at the time the
connection is established.
Looking forward to your solution.
Original comment by makingar...@gmail.com
on 12 Mar 2012 at 11:02
More details: It seems that in my case (slow upload => slow response from the
server) setting hSession's INTERNET_OPTION_RECEIVE_TIMEOUT to 0 is enough
without touching the rest of the timeout options.
Also, if there is no internet connection, timeout isn't an issue. In this case
it fails at HttpSendRequestEx with error code 12007
(ERROR_INTERNET_NAME_NOT_RESOLVED).
One small detail I forgot to mention earlier. Even if I leave the code as is
(default timeouts), the php script executes normally (responds with code 200
and sends me an email, given enough time). The actual problem is on the user
side. The user ends up seeing the log dialog with the error mentioned in the
first post, and he doesn't know if the report has been actually sent or not.
Hope that helps.
Original comment by makingar...@gmail.com
on 12 Mar 2012 at 4:21
I added the following code to resolve your problem:
HttpRequestSender.cpp:line 144
// Set large receive timeout to avoid problems in case of
// slow upload => slow response from the server.
DWORD dwReceiveTimeout = 0;
InternetSetOption(hConnect, INTERNET_OPTION_RECEIVE_TIMEOUT,
&dwReceiveTimeout, sizeof(dwReceiveTimeout));
Original comment by zexspect...@gmail.com
on 26 Aug 2012 at 4:29
This issue was closed by revision r1352.
Original comment by zexspect...@gmail.com
on 26 Aug 2012 at 4:30
Original issue reported on code.google.com by
makingar...@gmail.com
on 11 Mar 2012 at 7:40