Open GoogleCodeExporter opened 9 years ago
I believe this is an Android issue. I've hit the same problem with base 4.0.4
and am guessing it's an HTTP keep-alive issue as it only happens on the second
of back to back HttpsURLConnection use. I verified that I'm reading the whole
stream before disconnecting/returning to the pool, so will just disable
http.keepAlive for now. It's reproducible, but only happens about 25% of the
time.
Original comment by pushbit
on 21 Jun 2012 at 6:35
Confirmed, same here. Adding a "Connection: Close" header solves the problem.
Related discussion here: http://stackoverflow.com/a/13981774/454667
Original comment by bachi.in...@gmail.com
on 25 Mar 2013 at 5:48
Adding the following line
System.setProperty("http.keepAlive", "false");
just before creating the instance of the UrlConntion:
conn = (HttpURLConnection) url.openConnection();
Disables the keepalive via de client (android App). And also prevents the bug.
Original comment by barry.sc...@scarybarry.nl
on 5 Apr 2013 at 3:06
Original issue reported on code.google.com by
davidwu...@gmail.com
on 23 May 2012 at 7:53