File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
projects/client/RabbitMQ.Client/src/client/impl Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -988,11 +988,18 @@ public void StartMainLoop(bool useBackgroundThread)
988
988
mainLoopThread . Start ( ) ;
989
989
}
990
990
991
+ protected void StopHeartbeatTimers ( )
992
+ {
993
+ _heartbeatReadTimer . Dispose ( ) ;
994
+ _heartbeatWriteTimer . Dispose ( ) ;
995
+ }
996
+
991
997
///<remarks>
992
998
/// May be called more than once. Should therefore be idempotent.
993
999
///</remarks>
994
1000
public void TerminateMainloop ( )
995
1001
{
1002
+ StopHeartbeatTimers ( ) ;
996
1003
m_running = false ;
997
1004
}
998
1005
@@ -1077,6 +1084,7 @@ public void HandleConnectionUnblocked()
1077
1084
1078
1085
void IDisposable . Dispose ( )
1079
1086
{
1087
+ StopHeartbeatTimers ( ) ;
1080
1088
Abort ( ) ;
1081
1089
if ( ShutdownReport . Count > 0 )
1082
1090
{
You can’t perform that action at this time.
0 commit comments