Skip to content
Snippets Groups Projects
Commit 0956c1d5 authored by Guillaume Roguez's avatar Guillaume Roguez Committed by Adrien Béraud
Browse files

tls: fix conccurent access


rxQueue_ was not protected on one place causing troubles
and crashes in case of conccurent accesses.
Add a mutex lock to protect it.

Change-Id: Icca7516c325d321a1d8773dbb9e1cd2a18036c41
Reviewed-by: default avatarAdrien Beraud <adrien.beraud@savoirfairelinux.com>
parent 14f54750
No related branches found
No related tags found
No related merge requests found
......@@ -623,6 +623,7 @@ TlsSession::TlsSessionImpl::recvRaw(void* buf, size_t size)
return -1;
}
std::lock_guard<std::mutex> lk {rxMutex_};
if (rxQueue_.empty()) {
gnutls_transport_set_errno(session_, EAGAIN);
return -1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment