Hi This one has me stumped - my app is using comet style long polls to request data from my server. Every now and then, I get a request timeout that makes no sense to me - if I get disconnected, I start a reconnect mechanism where I check if my server is reachable (launching another GET HttpWebRequest to a known URL on my server - it if returns 200 OK, I'm back online and can log in again), if not, sleep, retry, the works.
Generally, when the timeout happens, the server is indeed offline (I'm connected via Wifi and I do detect changes in network connectivity state already - so I know it's not me going out of range or anything (in fact I have the phone about 20 cm from the antenna of the Wifi AP just to be on the safe side)), but every now and then (and I cannot figure out a reliable way to reproduce the issue), the timeouts make no sense. As I'm doing a simple HTTP GET request to determine if the server is available or not, I can simply open the URL in a browser and if that works, I know the network isn't the issue. I'm actually using RestSharp, not direct HttpWebRequests, but I see that I run into the timeout before a response is received. Does anybody have any idea as to what could be going on here? Note that I'm instantiating a new RestSharp.RestClient for every "is my server alive" request, so if something were to bomb out in RestSharp, that should take care of it. I'm also throttling those requests, so I won't have two concurrent requests for the same URL at the same time. Regards Stephan -- View this message in context: http://mono-for-android.1047100.n5.nabble.com/Temporary-disconnects-HttpWebRequests-time-out-tp5711985.html Sent from the Mono for Android mailing list archive at Nabble.com. _______________________________________________ Monodroid mailing list [email protected] UNSUBSCRIBE INFORMATION: http://lists.ximian.com/mailman/listinfo/monodroid
