add locks around Socket::send and Socket::recv to see if it helps with thread sanitizer error in Linux CI
This commit is contained in:
parent
0ba2e2ce96
commit
b0139c2217
@ -160,6 +160,8 @@ namespace ix
|
||||
|
||||
ssize_t Socket::send(char* buffer, size_t length)
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(_socketMutex);
|
||||
|
||||
int flags = 0;
|
||||
#ifdef MSG_NOSIGNAL
|
||||
flags = MSG_NOSIGNAL;
|
||||
@ -175,6 +177,8 @@ namespace ix
|
||||
|
||||
ssize_t Socket::recv(void* buffer, size_t length)
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(_socketMutex);
|
||||
|
||||
int flags = 0;
|
||||
#ifdef MSG_NOSIGNAL
|
||||
flags = MSG_NOSIGNAL;
|
||||
|
Loading…
x
Reference in New Issue
Block a user