Every time my midlet connects to the server, a new background thread will be started, and destroyed after data received from the server.
My midlet works well when connecting to the server, and will always succeed in getting whatever data I want if I process "action after action"(without any interrupt), but if I interrupt for a while(do nothing) between two actions, IOException will be thrown. The error message is as follows:
What's the reason for this problem? I need your help!
It's difficult to say without knowing more about how your program works... at the point the exception occurs, it looks like you're trying to write data to the network output stream. The most obvious reason why it might throw an IOException when writing to an output stream would be that the output stream is closed. Is that possible?