Java error - Software caused connection abort: recv failed

后端 未结 3 1835
梦如初夏
梦如初夏 2021-01-05 15:11

The full error is:

java.net.SocketException: Software caused connection abort: recv failed
    at java.net.SocketInputStream.socketRead0(Native Method)
    a         


        
3条回答
  •  时光取名叫无心
    2021-01-05 15:50

    I couldn't get your exact problem to replicate on my own computer using your code and localhost-connections, but after reading about "BufferedReader.readLine() throwing java.net.SocketException: Software caused connection abort: recv failed" in several different pages, I believe this is related to your network. The connection seems to be terminated due to TCP timeout or data corrupted in the transmission.

    If this happens over localhost-connections (server and client in same computer), it could be a faulty memory, otherwise you might have a broken nic, router or cable somewhere along the line. If you're using wireless, they can be pretty unreliable.

提交回复
热议问题