何时是“java.io.IOException:Connection by peer”抛出? [英] When is "java.io.IOException:Connection reset by peer" thrown?

查看:272
本文介绍了何时是“java.io.IOException:Connection by peer”抛出?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

ERROR GServerHandler  - java.io.IOException: Connection reset by peer
java.io.IOException: Connection reset by peer
        at sun.nio.ch.FileDispatcher.read0(Native Method)
        at sun.nio.ch.SocketDispatcher.read(Unknown Source)
        at sun.nio.ch.IOUtil.readIntoNativeBuffer(Unknown Source)
        at sun.nio.ch.IOUtil.read(Unknown Source)
        at sun.nio.ch.SocketChannelImpl.read(Unknown Source)
        at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:323)
        at org.jboss.netty.channel.socket.nio.NioWorker.processSelectedKeys(NioWorker.java:282)
        at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:202)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)

此日志来自a使用netty实现的游戏服务器。什么可以导致这个例外?

This log is from a game server implemented using netty. What can cause this exception ?

推荐答案


java.io.IOException:通过对等方重置连接

java.io.IOException: Connection reset by peer

另一方在交易中突然中止了连接。这可能有许多原因,无法从服务器端控制。例如。最终用户决定关闭客户端或突然更改服务器,同时仍与服务器交互,或客户端程序崩溃,或最终用户的Internet连接中断,或最终用户的计算机崩溃等等。

The other side has abruptly aborted the connection in midst of a transaction. That can have many causes which are not controllable from the server side on. E.g. the enduser decided to shutdown the client or change the server abruptly while still interacting with your server, or the client program has crashed, or the enduser's internet connection went down, or the enduser's machine crashed, etc, etc.

这篇关于何时是“java.io.IOException:Connection by peer”抛出?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆