I am getting the following error trying to read from a socket.
(我在尝试从套接字读取时遇到以下错误。)
I'm doing a readInt()
on that InputStream
, and I am getting this error. (我正在该InputStream
上执行readInt()
,并且遇到此错误。)
Perusing the documentation this suggests that the client part of the connection closed the connection. (仔细阅读文档,这表明连接的客户端部分关闭了连接。)
In this scenario, I am the server. (在这种情况下,我是服务器。)
I have access to the client log files and it is not closing the connection, and in fact its log files suggest I am closing the connection.
(我可以访问客户端日志文件,但它没有关闭连接,实际上它的日志文件表明我正在关闭连接。)
So does anybody have an idea why this is happening? (有人知道为什么会这样吗?)
What else to check for? (还有什么要检查的?)
Does this arise when there are local resources that are perhaps reaching thresholds? (当有本地资源可能达到阈值时,会发生这种情况吗?)
I do note that I have the following line:
(我确实注意到我有以下几行:)
socket.setSoTimeout(10000);
just prior to the readInt()
.
(就在readInt()
。)
There is a reason for this (long story), but just curious, are there circumstances under which this might lead to the indicated error? (这是有原因的(长话短说),但出于好奇,在某些情况下会导致所指示的错误吗?)
I have the server running in my IDE, and I happened to leave my IDE stuck on a breakpoint, and I then noticed the exact same errors begin appearing in my own logs in my IDE. (我的服务器在IDE中运行,我碰巧将IDE卡在断点上,然后我发现完全相同的错误开始出现在我自己的IDE日志中。)
Anyway, just mentioning it, hopefully not a red herring.
(无论如何,仅提及它,希望它不会成为鲱鱼。)
:-( (:-()
ask by translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…