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

This commit is contained in:
Akkia 2023-06-19 05:13:05 +08:00
parent 966dfc0496
commit dcbc89c310

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()