Lock before adding or removing message callbacks

This commit is contained in:
Paul Hollinsky
2019-06-13 15:47:23 -04:00
parent 4530bd14c0
commit b7dbeccaef
2 changed files with 5 additions and 1 deletions
@@ -57,6 +57,7 @@ public:
protected:
std::unique_ptr<ICommunication> impl;
static int messageCallbackIDCounter;
std::mutex messageCallbacksLock;
std::map<int, MessageCallback> messageCallbacks;
std::atomic<bool> closing{false};