Connection reset versus Connection reset by Peer

笑着哭i 提交于 2020-01-13 04:56:07

问题


I have a client-server application. In the client side(I have no access to client code), a socket exception occurs intermittently that says "java.net.SocketException: Connection reset". It's not "java.net.SocketException: Connection reset by peer". With this information, can I conclude that the issue is with Client side?


回答1:


Usually "Connection reset" means that both sides did an orderly close of the connection, and then you attempted to work on that socket. The reason for the orderly shutdown could have been initiated by either side. So I'd say that you can't determine which side based on this error.

"Connection Reset by Peer" means the remote end would have sent a reset packet (RST) to kill the connection without an orderly shutdown (close). In that case you know it was the peer(client).



来源:https://stackoverflow.com/questions/25758267/connection-reset-versus-connection-reset-by-peer

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!