I have a MINA program that uses NioSocketConnector (client) and NioSocketAdapter (server). Both of these work except when the NioSocketConnector needs to write a response back to the server. When I attempt to write, I have about a 50/50 shot of the connection shutting down immediately after I do the ioSession.write(message). If I comment out the ioSession.write(message), then 100% of the time, the message gets through.
At first I thought it was a matter of the message--perhaps it was too long or had some kind of magical string, but even short messages getting written out cause the connection to end.
No exceptions are caught and none are getting swallowed. Everything is going out to the console and to the log4j log, which is set to DEBUG.
Right now I'm just curious if anyone else has had this problem.