I have finally found the problem, I was calling a inputstream.shutdown() method when I was sending a file or outputstream.shutdown() method when I was receiving a file,
I was doing this for some security and optimization reasons ( make sure that only required streams are open during transactions ), it looks like that on certain socket implementation, the shutdown() method call will cause that behaviour.
I do not use this shutdown method anymore, I prefer to have something that works with your client but a little bit less secure.
|