I'm transfering a file across a LAN(using JxtaSocket in case you heard about it) and I receive:
java.net.SocketTimeoutException: Failed to receive close ack from remote connection. at net.jxta.socket.JxtaSocket.close(JxtaSocket.java:1046)
I would like to know what are the reasons this w开发者_如何学编程ould happen in the first place. I'm receiving this exception at a regular pace, after I send one file(which is 2.9 mb). All other files are under 1 Mb and work fine.
On the other hand, it might be JXTA's fault I suppose.
Any response will be highly appreciated!
Some members of the JXTA community have experienced such issues with release 2.5, but it has disappeared in 2.6 and 2.7. This could explain/solve that.
TCP is a complicated protocol.
One part of it is that when clients are shutting down their connection the requesting side (the side that initially tried to close) has to wait for a close acknowledgment from the other side, to make sure that the remote side knows that we are closing down the connection. Unfortunately it is common for the shutdown handshake not to occur properly (sometimes clients just close instead of properly going through the handshake). In practise this doesn't really matter because all the important communication is done.
so long story short, what you are most likely seeing here is a misbehaving client, but i wouldn't worry about it.
Wikipedia has a good discussion of the TCP connection termination protocol
精彩评论