Fix 2 race conditions detected with TSan, one in CobraMetricsPublisher::push and another one in WebSocketTransport::sendData (that one was bad).

This commit is contained in:
Benjamin Sergeant
2019-09-24 11:46:54 -07:00
parent 39c0fb0072
commit ea83327261
8 changed files with 45 additions and 3 deletions

View File

@ -867,7 +867,10 @@ namespace ix
message_end = compressedMessage.end();
}
_txbuf.reserve(wireSize);
{
std::lock_guard<std::mutex> lock(_socketMutex);
_txbuf.reserve(wireSize);
}
// Common case for most message. No fragmentation required.
if (wireSize < kChunkSize)

View File

@ -6,4 +6,4 @@
#pragma once
#define IX_WEBSOCKET_VERSION "6.2.5"
#define IX_WEBSOCKET_VERSION "6.2.6"