When is “java.io.IOException:Connection reset by peer” thrown?

后端 未结 8 987
不思量自难忘°
不思量自难忘° 2020-12-08 13:00
ERROR GServerHandler  - java.io.IOException: Connection reset by peer
java.io.IOException: Connection reset by peer
        at sun.nio.ch.FileDispatcher.read0(Native         


        
8条回答
  •  伪装坚强ぢ
    2020-12-08 13:26

    I think this should be java.net.SocketException as its definition is stated for a TCP error.

    /**
     * Thrown to indicate that there is an error in the underlying 
     * protocol, such as a TCP error. 
     *
     * @author  Jonathan Payne
     * @version %I%, %G%
     * @since   JDK1.0
     */
    public 
    class SocketException extends IOException {
    

提交回复
热议问题