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
111
111
{
112
112
try
113
113
{
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
+ }
116
119
}
117
120
catch ( SocketException )
118
121
{
@@ -125,8 +128,11 @@ public TimeSpan WriteTimeout
125
128
{
126
129
set
127
130
{
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
+ }
130
136
}
131
137
}
132
138
You can’t perform that action at this time.
0 commit comments