Skip to content

Commit

Permalink
Merge pull request #874 from mikepmiller/master
Browse files Browse the repository at this point in the history
PgmSession: Add handling for ConnectionAborted
  • Loading branch information
somdoron authored May 12, 2020
2 parents f9f5a0c + 97fd709 commit 6c8887c
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/NetMQ/Core/Transports/Pgm/PgmSession.cs
Original file line number Diff line number Diff line change
@@ -77,7 +77,20 @@ public void BeginReceive()
// For a UDP datagram socket, this error would indicate that a previous
// send operation resulted in an ICMP "Port Unreachable" message.
if (ex.SocketErrorCode == SocketError.ConnectionReset)
Error();
Error();
// ** Berkeley Description: A connection abort was caused internal to your host machine.
// The software caused a connection abort because there is no space on the socket's queue
// and the socket cannot receive further connections.
// ** WinSock description: The error can occur when the local network system aborts a connection.
// This would occur if WinSock aborts an established connection after data retransmission
// fails (receiver never acknowledges data sent on a datastream socket).
// ** Windows Sockets Error Codes: Software caused connection abort.
// An established connection was aborted by the software in your host computer,
// possibly due to a data transmission time -out or protocol error.
// ** WSARecv Error Code Description: The virtual circuit was terminated due to a
// time -out or other failure.
else if (ex.SocketErrorCode == SocketError.ConnectionAborted)
Error();
else
throw NetMQException.Create(ex.SocketErrorCode, ex);
}

0 comments on commit 6c8887c

Please sign in to comment.