Skip to content

Commit 6c8887c

Browse files
authored
Merge pull request #874 from mikepmiller/master
PgmSession: Add handling for ConnectionAborted
2 parents f9f5a0c + 97fd709 commit 6c8887c

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

src/NetMQ/Core/Transports/Pgm/PgmSession.cs

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,20 @@ public void BeginReceive()
7777
// For a UDP datagram socket, this error would indicate that a previous
7878
// send operation resulted in an ICMP "Port Unreachable" message.
7979
if (ex.SocketErrorCode == SocketError.ConnectionReset)
80-
Error();
80+
Error();
81+
// ** Berkeley Description: A connection abort was caused internal to your host machine.
82+
// The software caused a connection abort because there is no space on the socket's queue
83+
// and the socket cannot receive further connections.
84+
// ** WinSock description: The error can occur when the local network system aborts a connection.
85+
// This would occur if WinSock aborts an established connection after data retransmission
86+
// fails (receiver never acknowledges data sent on a datastream socket).
87+
// ** Windows Sockets Error Codes: Software caused connection abort.
88+
// An established connection was aborted by the software in your host computer,
89+
// possibly due to a data transmission time -out or protocol error.
90+
// ** WSARecv Error Code Description: The virtual circuit was terminated due to a
91+
// time -out or other failure.
92+
else if (ex.SocketErrorCode == SocketError.ConnectionAborted)
93+
Error();
8194
else
8295
throw NetMQException.Create(ex.SocketErrorCode, ex);
8396
}

0 commit comments

Comments
 (0)