diff options
author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2019-08-08 15:29:13 -0500 |
---|---|---|
committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2019-08-08 15:29:13 -0500 |
commit | 28d0070ce2e791727c388646f22119e350ab6d78 (patch) | |
tree | 9cd411fad644e021b5ccb64e47c0ab8ac74358a6 /controller/DBMirrorSet.cpp | |
parent | ad2a7c2590467270486c15144330f2c3e87ec080 (diff) | |
download | infinitytier-28d0070ce2e791727c388646f22119e350ab6d78.tar.gz infinitytier-28d0070ce2e791727c388646f22119e350ab6d78.zip |
Fix race in multiple DB mirroring configurations.
Diffstat (limited to 'controller/DBMirrorSet.cpp')
-rw-r--r-- | controller/DBMirrorSet.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/controller/DBMirrorSet.cpp b/controller/DBMirrorSet.cpp index 5d9ea050..5b491216 100644 --- a/controller/DBMirrorSet.cpp +++ b/controller/DBMirrorSet.cpp @@ -125,14 +125,14 @@ bool DBMirrorSet::save(nlohmann::json &record,bool notifyListeners) } if (notifyListeners) { for(auto d=dbs.begin();d!=dbs.end();++d) { - if ((*d)->save(record,notifyListeners)) + if ((*d)->save(record,true)) return true; } return false; } else { bool modified = false; for(auto d=dbs.begin();d!=dbs.end();++d) { - modified |= (*d)->save(record,notifyListeners); + modified |= (*d)->save(record,false); } return modified; } |