File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
projects/RabbitMQ.Client/Impl Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -111,8 +111,11 @@ public TimeSpan ReadTimeout
111111 {
112112 try
113113 {
114- _socket . ReceiveTimeout = value ;
115- _stream . ReadTimeout = ( int ) value . TotalMilliseconds ;
114+ if ( value != default )
115+ {
116+ _socket . ReceiveTimeout = value ;
117+ _stream . ReadTimeout = ( int ) value . TotalMilliseconds ;
118+ }
116119 }
117120 catch ( SocketException )
118121 {
@@ -125,8 +128,11 @@ public TimeSpan WriteTimeout
125128 {
126129 set
127130 {
128- _socket . Client . SendTimeout = ( int ) value . TotalMilliseconds ;
129- _stream . WriteTimeout = ( int ) value . TotalMilliseconds ;
131+ if ( value != default )
132+ {
133+ _socket . Client . SendTimeout = ( int ) value . TotalMilliseconds ;
134+ _stream . WriteTimeout = ( int ) value . TotalMilliseconds ;
135+ }
130136 }
131137 }
132138
You can’t perform that action at this time.
0 commit comments