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 5656//---------------------------------------------------------------------------
5757using System ;
5858using System . IO ;
59+ using System . Net . Sockets ;
5960
6061using RabbitMQ . Util ;
6162using RabbitMQ . Client . Exceptions ;
@@ -109,8 +110,12 @@ public static Frame ReadFrom(NetworkBinaryReader reader)
109110 }
110111 catch ( IOException ioe )
111112 {
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 ;
114119 else
115120 throw ;
116121 }
You can’t perform that action at this time.
0 commit comments