File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
projects/client/RabbitMQ.Client/src/client/impl Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -1057,17 +1057,21 @@ public void HeartbeatReadTimerCallback(object state)
1057
1057
TerminateMainloop ( ) ;
1058
1058
FinishClose ( ) ;
1059
1059
}
1060
- else
1060
+ else if ( _heartbeatReadTimer != null )
1061
1061
{
1062
1062
_heartbeatReadTimer . Change ( Heartbeat * 1000 , Timeout . Infinite ) ;
1063
1063
}
1064
1064
}
1065
1065
catch ( ObjectDisposedException ignored )
1066
1066
{
1067
-
1068
1067
// timer is already disposed,
1069
1068
// e.g. due to shutdown
1070
1069
}
1070
+ catch ( NullReferenceException )
1071
+ {
1072
+ // timer has already been disposed from a different thread after null check
1073
+ // this event should be rare
1074
+ }
1071
1075
}
1072
1076
1073
1077
public void HeartbeatWriteTimerCallback ( object state )
You can’t perform that action at this time.
0 commit comments