不忽略首次请求就出错的情况

This commit is contained in:
Akkia
2023-06-19 05:13:05 +08:00
parent e6d46f11fe
commit 09a7d77bea
+1 -1
View File
@@ -416,7 +416,7 @@ func (ss *ServiceSentinel) worker() {
ss.lastStatus[mh.GetId()] = stateCode
// 判断是否需要发送通知
isNeedSendNotification := ss.monitors[mh.GetId()].Notify && lastStatus != 0
isNeedSendNotification := ss.monitors[mh.GetId()].Notify && (lastStatus != 0 || stateCode == StatusDown)
if isNeedSendNotification {
ServerLock.RLock()