Closed lichao315 closed 6 years ago
调stopConnect方法时,异常: 08-02 08:44:23.283 26589-26589/com.rabtman.wsdemo W/System.err: java.net.SocketException: Socket closed 08-02 08:44:23.283 26589-26589/com.rabtman.wsdemo W/System.err: at java.net.SocketInputStream.socketRead0(Native Method) 08-02 08:44:23.283 26589-26589/com.rabtman.wsdemo W/System.err: at java.net.SocketInputStream.read(SocketInputStream.java:151) 08-02 08:44:23.284 26589-26589/com.rabtman.wsdemo W/System.err: at java.net.SocketInputStream.read(SocketInputStream.java:120) 08-02 08:44:23.284 26589-26589/com.rabtman.wsdemo W/System.err: at okio.Okio$2.read(Okio.java:139) 08-02 08:44:23.284 26589-26589/com.rabtman.wsdemo W/System.err: at okio.AsyncTimeout$2.read(AsyncTimeout.java:237) 08-02 08:44:23.284 26589-26589/com.rabtman.wsdemo W/System.err: at okio.RealBufferedSource.request(RealBufferedSource.java:67) 08-02 08:44:23.284 26589-26589/com.rabtman.wsdemo W/System.err: at okio.RealBufferedSource.require(RealBufferedSource.java:60) 08-02 08:44:23.284 26589-26589/com.rabtman.wsdemo W/System.err: at okio.RealBufferedSource.readByte(RealBufferedSource.java:73) 08-02 08:44:23.284 26589-26589/com.rabtman.wsdemo W/System.err: at okhttp3.internal.ws.WebSocketReader.readHeader(WebSocketReader.java:113) 08-02 08:44:23.284 26589-26589/com.rabtman.wsdemo W/System.err: at okhttp3.internal.ws.WebSocketReader.processNextFrame(WebSocketReader.java:97) 08-02 08:44:23.284 26589-26589/com.rabtman.wsdemo W/System.err: at okhttp3.internal.ws.RealWebSocket.loopReader(RealWebSocket.java:262) 08-02 08:44:23.284 26589-26589/com.rabtman.wsdemo W/System.err: at okhttp3.internal.ws.RealWebSocket$2.onResponse(RealWebSocket.java:201) 08-02 08:44:23.284 26589-26589/com.rabtman.wsdemo W/System.err: at okhttp3.RealCall$AsyncCall.execute(RealCall.java:141) 08-02 08:44:23.284 26589-26589/com.rabtman.wsdemo W/System.err: at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32) 08-02 08:44:23.284 26589-26589/com.rabtman.wsdemo W/System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) 08-02 08:44:23.284 26589-26589/com.rabtman.wsdemo W/System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) 08-02 08:44:23.284 26589-26589/com.rabtman.wsdemo W/System.err: at java.lang.Thread.run(Thread.java:761)
这与连接的服务器有关,详见https://github.com/square/okhttp/issues/3113
调stopConnect方法时,异常: 08-02 08:44:23.283 26589-26589/com.rabtman.wsdemo W/System.err: java.net.SocketException: Socket closed 08-02 08:44:23.283 26589-26589/com.rabtman.wsdemo W/System.err: at java.net.SocketInputStream.socketRead0(Native Method) 08-02 08:44:23.283 26589-26589/com.rabtman.wsdemo W/System.err: at java.net.SocketInputStream.read(SocketInputStream.java:151) 08-02 08:44:23.284 26589-26589/com.rabtman.wsdemo W/System.err: at java.net.SocketInputStream.read(SocketInputStream.java:120) 08-02 08:44:23.284 26589-26589/com.rabtman.wsdemo W/System.err: at okio.Okio$2.read(Okio.java:139) 08-02 08:44:23.284 26589-26589/com.rabtman.wsdemo W/System.err: at okio.AsyncTimeout$2.read(AsyncTimeout.java:237) 08-02 08:44:23.284 26589-26589/com.rabtman.wsdemo W/System.err: at okio.RealBufferedSource.request(RealBufferedSource.java:67) 08-02 08:44:23.284 26589-26589/com.rabtman.wsdemo W/System.err: at okio.RealBufferedSource.require(RealBufferedSource.java:60) 08-02 08:44:23.284 26589-26589/com.rabtman.wsdemo W/System.err: at okio.RealBufferedSource.readByte(RealBufferedSource.java:73) 08-02 08:44:23.284 26589-26589/com.rabtman.wsdemo W/System.err: at okhttp3.internal.ws.WebSocketReader.readHeader(WebSocketReader.java:113) 08-02 08:44:23.284 26589-26589/com.rabtman.wsdemo W/System.err: at okhttp3.internal.ws.WebSocketReader.processNextFrame(WebSocketReader.java:97) 08-02 08:44:23.284 26589-26589/com.rabtman.wsdemo W/System.err: at okhttp3.internal.ws.RealWebSocket.loopReader(RealWebSocket.java:262) 08-02 08:44:23.284 26589-26589/com.rabtman.wsdemo W/System.err: at okhttp3.internal.ws.RealWebSocket$2.onResponse(RealWebSocket.java:201) 08-02 08:44:23.284 26589-26589/com.rabtman.wsdemo W/System.err: at okhttp3.RealCall$AsyncCall.execute(RealCall.java:141) 08-02 08:44:23.284 26589-26589/com.rabtman.wsdemo W/System.err: at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32) 08-02 08:44:23.284 26589-26589/com.rabtman.wsdemo W/System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) 08-02 08:44:23.284 26589-26589/com.rabtman.wsdemo W/System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) 08-02 08:44:23.284 26589-26589/com.rabtman.wsdemo W/System.err: at java.lang.Thread.run(Thread.java:761)