File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
projects/client/RabbitMQ.Client/src/client/impl Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 56
56
//---------------------------------------------------------------------------
57
57
using System ;
58
58
using System . IO ;
59
+ using System . Net . Sockets ;
59
60
60
61
using RabbitMQ . Util ;
61
62
using RabbitMQ . Client . Exceptions ;
@@ -109,8 +110,12 @@ public static Frame ReadFrom(NetworkBinaryReader reader)
109
110
}
110
111
catch ( IOException ioe )
111
112
{
112
- if ( ioe . InnerException != null )
113
- throw ioe . InnerException ;
113
+ // If it's a WSAETIMEDOUT SocketException, unwrap it.
114
+ // This might happen when the limit of half-open connections is
115
+ // reached.
116
+ SocketException se = ( SocketException ) ioe . InnerException ;
117
+ if ( se != null && se . SocketErrorCode == SocketError . TimedOut )
118
+ throw se ;
114
119
else
115
120
throw ;
116
121
}
You can’t perform that action at this time.
0 commit comments