开发者

Can a socket be closed on local end without Close being called?

开发者 https://www.devze.com 2023-01-13 08:46 出处:网络
I\'m having a problem where a socket appears to be开发者_如何学运维 closing by itself. Here\'s the (edited) network diagnostic trace:

I'm having a problem where a socket appears to be开发者_如何学运维 closing by itself.

Here's the (edited) network diagnostic trace:

Exiting Socket#62696216::BeginSend()
Exiting Socket#62696216::EndSend()
Socket#62696216::BeginSend()
Exception in the Socket#62696216::BeginSend - An established connection was aborted by the    software in your host machine

Notice that there's a successful send and then there's an error. The error says that the socket was closed locally (i.e. on the host machine), and yet Close was not called. It's an intermittent error, which only happens perhaps once in a thousand times.

How did the socket end up being closed?

I feel like there must be a really simple answer, but it's eluded me for hours. Any help would be much appreciated.

Thank you


Could be a number of things.. -timeout -number of sockets opened on your host machine exceeded limit -bug in your code

Without seeing the code or knowing the environment it would be difficult to determine.


This is what it would look like if a kernel-mode antivirus chose to block the transfer.


This will usually mean one of two things. Either you have a firewall or an antivirus that considers your program to be malicious, or (more likely if it only happens once in a while) one of the previous sends times out and that makes the system close the socket. As far as I know, the fact that EndSend returns without signaling an error does not really mean that the data has been physically delivered to the destination server.

0

精彩评论

暂无评论...
验证码 换一张
取 消