FWIW, I did read:
but this is happening consistently - its not like its a socket timeout or it does this sporadically. This happens every time I try to send a message in this one particular place in my code (where everywhere else, it is working).
I'm trying to find out what's different between the code that works and the code that doesn't.
SocketWrapper.CLOSING should be sent only when a ServerThread shuts down and closes its socket. What's going on on the server side?
Ah.. I see it. On the server side, the message was received, but the de-serialization of one of my incoming objects within the message failed. Hence, the server socket closes immediately and hence why I get the error that I do on the client side.
This looks like its a problem on my end. In short, I need to make sure I send an object that is de-serializable on the server.