Skip to content

Commit 4a52151

Browse files
authoredNov 22, 2022
feature: Stop heartbeat detection when dapr stops (#343)
1 parent 0d2b76e commit 4a52151

File tree

1 file changed

+5
-0
lines changed
  • src/Contrib/Development/Masa.Contrib.Development.DaprStarter

1 file changed

+5
-0
lines changed
 

‎src/Contrib/Development/Masa.Contrib.Development.DaprStarter/DaprProcess.cs

+5
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@ private void StartCore(DaprCoreOptions options)
7777
_heartBeatTimer.Elapsed += (_, _) => HeartBeat();
7878
_heartBeatTimer.Start();
7979
}
80+
else
81+
{
82+
_heartBeatTimer?.Start();
83+
}
8084
}
8185

8286
public void CompleteDaprEnvironment(ushort? httpPort, ushort? grpcPort)
@@ -114,6 +118,7 @@ public void Stop()
114118
lock (_lock)
115119
{
116120
StopCore(SuccessDaprOptions);
121+
_heartBeatTimer?.Stop();
117122
}
118123
}
119124

0 commit comments

Comments
 (0)
Please sign in to comment.