-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Lock protocolMap with a mutex to prevent data race (#284)
* Lock protocolMap with a mutex to prevent data race * Fix protocolMapMutex comments * Convert thread-safe protocolMap access to a function * Make getProtocol return an optional * Add additional locks for ProtocolData client and heartbeatInfo * Change entry mutex access in validate * Remove chained getters * Remove duplicate protocolMapMutex lock and heartbeat timeout * Remove lock from onMessage and lock stop earlier * Make onMessage use getProtocol * Log heartbeat timeout earlier * Fix server stop, reintroduce sendRawString data mutex without heartbeat timeout * Add comment explaining missing lock * Replace protocolMap.find() with getProtocol()
- Loading branch information
Showing
3 changed files
with
57 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters