diff options
author | Tor Brede Vekterli <vekterli@yahooinc.com> | 2022-05-02 13:09:22 +0000 |
---|---|---|
committer | Tor Brede Vekterli <vekterli@yahooinc.com> | 2022-05-02 13:11:31 +0000 |
commit | 60858efdde6aa2c741fae306ac7266e4c3835c61 (patch) | |
tree | 69cf8b7cbfacba85d795e28ac890531456a36728 /storage | |
parent | cb39fa7835fd0bfa8cd044f35a3c19680c9be836 (diff) |
Re-acquire state lock before checking if any fields were set by the state listener
Diffstat (limited to 'storage')
-rw-r--r-- | storage/src/vespa/storage/storageserver/statemanager.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/storage/src/vespa/storage/storageserver/statemanager.cpp b/storage/src/vespa/storage/storageserver/statemanager.cpp index 7cb66ab447f..60aebf5a535 100644 --- a/storage/src/vespa/storage/storageserver/statemanager.cpp +++ b/storage/src/vespa/storage/storageserver/statemanager.cpp @@ -272,8 +272,9 @@ StateManager::notifyStateListeners() } for (auto* listener : _stateListeners) { listener->handleNewState(); - // If one of them actually altered the state again, abort - // sending events, update states and send new one to all. + // If one of them actually altered the state again, abort + // sending events, update states and send new one to all. + std::lock_guard guard(_stateLock); if (_nextNodeState || _nextSystemState) { break; } |