object is locked twice to update values of
NotificationNumber, LastNotification and LastProblemNotification.
LastNotificaiton is updated inside each ObjectLock
merge two ObjectLocks into one and remove duplicate update
fixes #12188
Signed-off-by: Michael Friedrich <michael.friedrich@netways.de>
{
ObjectLock olock(this);
+ UpdateNotificationNumber();
double now = Utility::GetTime();
SetLastNotification(now);
-
if (type == NotificationProblem)
SetLastProblemNotification(now);
}
std::copy(members.begin(), members.end(), std::inserter(allUsers, allUsers.begin()));
}
- {
- ObjectLock olock(this);
- UpdateNotificationNumber();
- SetLastNotification(Utility::GetTime());
- }
-
std::set<User::Ptr> allNotifiedUsers;
Array::Ptr notifiedUsers = GetNotifiedUsers();