Skip to content
Snippets Groups Projects
Commit b3c8e1b3 authored by Guillaume Roguez's avatar Guillaume Roguez
Browse files

tls: always accept send request from application

Even if the session is closed (shutdown) accept messages
as they will be cancel anyway when the thread stops.
This permits a good behavior of application level, like pjsip.

Change-Id: I324e00d0b607a24e5cbf82c9466f65fa8f6ae4cb
Tuleap: #466
parent e7161574
No related branches found
No related tags found
No related merge requests found
......@@ -292,8 +292,6 @@ TlsSession::getCurrentCipherSuiteId(std::array<uint8_t, 2>& cs_id) const
ssize_t
TlsSession::async_send(void* data, std::size_t size, TxDataCompleteFunc on_send_complete)
{
if (state_ == TlsSessionState::SHUTDOWN)
return GNUTLS_E_INVALID_SESSION;
std::lock_guard<std::mutex> lk {ioMutex_};
txQueue_.emplace_back(TxData {data, size, on_send_complete});
ioCv_.notify_one();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment