I have developed a midlet that uses an HttpConnection. There is a separate thread that does the connection.
Now what I did was provide another method called cancel() on that Thread which will call HttpConnection.close() even when HttpConnection is being used in the run() method.
This way I sort of interrup/cancel the connection. This works fine on my sun wireless emulator but it does not work on Nokia device and Nokia SDK2.
Is it possible that one thread is using the HttpConnection and another thread is calling close() on it? I was expecting an Exception to be thrown but instead the midlet hangs.