I have a MIDlet that makes a HTTP GET request every 10 sec. I find that it hangs once for a while in the openInputStream() call and its frequency seems to depend on the surronding environment (e.g. indoor, outdoor). I'm using the Nokia 7650 and the WAP 9.6k connection. Does anyone come across the same problem. Any idea why?
CM_WONG said his app hangs on openInputStream(), but as far as I can tell mine hangs on getResponseCode(). I call getResponeCode() before I open the input stream though, so for both of us it happens when the connection transitions into the connected state.
What I'm saying is that I don't think it has anything to do specifically with either openInputStream() or getResponseCode(), but with the transition to the connected state itself which can be caused by these two or a bunch of other functions (I bet that if someone tries to call getLength or getType() as the next call after opening the connection it will hang on those).
Did anyone ever get an answer on this? I too am having problems on a 3650. My HttpConnection works fine for some number of requests/responses, but then it starts throwing IOExceptions with status = -33 or -20019. Is ther any way around this?