File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed
src/NetMQ/Core/Transports/Pgm Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -24,3 +24,4 @@ Contributors
24
24
* Dale Brubaker &mdash ; [ @dalebrubaker ] ( https://github.com/dalebrubaker )
25
25
* Calin Pirtea &mdash ; [ @pcalin ] ( https://github.com/pcalin )
26
26
* Osiris Pedroso &mdash ; [ @opedroso ] ( https://github.com/opedroso )
27
+ * Mike Miller &mdash ; [ @mikepmiller ] ( https://github.com/mikepmiller )
Original file line number Diff line number Diff line change @@ -68,7 +68,19 @@ public void Terminate()
68
68
public void BeginReceive ( )
69
69
{
70
70
m_data . Reset ( ) ;
71
- m_handle . Receive ( ( byte [ ] ) m_data ) ;
71
+ try
72
+ {
73
+ m_handle . Receive ( ( byte [ ] ) m_data ) ;
74
+ }
75
+ catch ( SocketException ex )
76
+ {
77
+ // For a UDP datagram socket, this error would indicate that a previous
78
+ // send operation resulted in an ICMP "Port Unreachable" message.
79
+ if ( ex . SocketErrorCode == SocketError . ConnectionReset )
80
+ Error ( ) ;
81
+ else
82
+ throw NetMQException . Create ( ex . SocketErrorCode , ex ) ;
83
+ }
72
84
}
73
85
74
86
public void ActivateIn ( )
@@ -223,4 +235,4 @@ public void ActivateOut()
223
235
DropSubscriptions ( ) ;
224
236
}
225
237
}
226
- }
238
+ }
You can’t perform that action at this time.
0 commit comments