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 @@ -1024,17 +1024,21 @@ public void HeartbeatReadTimerCallback(object state)
1024
1024
TerminateMainloop ( ) ;
1025
1025
FinishClose ( ) ;
1026
1026
}
1027
- else
1027
+ else if ( _heartbeatReadTimer != null )
1028
1028
{
1029
1029
_heartbeatReadTimer . Change ( Heartbeat * 1000 , Timeout . Infinite ) ;
1030
1030
}
1031
1031
}
1032
1032
catch ( ObjectDisposedException )
1033
1033
{
1034
-
1035
1034
// timer is already disposed,
1036
1035
// e.g. due to shutdown
1037
1036
}
1037
+ catch ( NullReferenceException )
1038
+ {
1039
+ // timer has already been disposed from a different thread after null check
1040
+ // this event should be rare
1041
+ }
1038
1042
}
1039
1043
1040
1044
public void HeartbeatWriteTimerCallback ( object state )
You can’t perform that action at this time.
0 commit comments