Note that there are some explanatory texts on larger screens.

plurals
  1. POAn existing connection was forcibly closed by the remote host
    primarykey
    data
    text
    <p>I am working with a commercial application which is throwing a SocketException with the message,</p> <blockquote> <p>An existing connection was forcibly closed by the remote host</p> </blockquote> <p>This happens with a socket connection between client and server. The connection is alive and well, and heaps of data is being transferred, but it then becomes disconnected out of nowhere.</p> <p>Has anybody seen this before? What could the causes be? I can kind of guess a few causes, but also is there any way to add more into this code to work out what the cause could be?</p> <p>Any comments / ideas are welcome.</p> <p>... The latest ...</p> <p>I have some logging from some .NET tracing,</p> <pre><code>System.Net.Sockets Verbose: 0 : [8188] Socket#30180123::Send() DateTime=2010-04-07T20:49:48.6317500Z System.Net.Sockets Error: 0 : [8188] Exception in the Socket#30180123::Send - An existing connection was forcibly closed by the remote host DateTime=2010-04-07T20:49:48.6317500Z System.Net.Sockets Verbose: 0 : [8188] Exiting Socket#30180123::Send() -&gt; 0#0 </code></pre> <p>Based on other parts of the logging I have seen the fact that it says '0#0' means a packet of 0 bytes length is being sent. But what does that really mean?</p> <p>One of two possibilities is occuring, and I am not sure which,</p> <p>1) The connection is being closed, but data is then being written to the socket, thus creating the exception above. The 0#0 simply means that nothing was sent because the socket was already closed.</p> <p>2) The connection is still open, and a packet of zero bytes is being sent (i.e. the code has a bug) and the 0#0 means that a packet of zero bytes is trying to be sent.</p> <p>What do you reckon? It might be inconclusive I guess, but perhaps someone else has seen this kind of thing?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload