fix data race on _useMask

This commit is contained in:
Alexandre Konieczny 2019-04-29 17:16:30 +02:00 committed by Benjamin Sergeant
parent 705e0823cb
commit c7e52e6fcd

View File

@ -119,7 +119,7 @@ namespace ix
// Tells whether we should mask the data we send. // Tells whether we should mask the data we send.
// client should mask but server should not // client should mask but server should not
bool _useMask; std::atomic<bool> _useMask;
// Buffer for reading from our socket. That buffer is never resized. // Buffer for reading from our socket. That buffer is never resized.
std::vector<uint8_t> _readbuf; std::vector<uint8_t> _readbuf;