Commit 494b3996 authored by Adrien Béraud's avatar Adrien Béraud

sips_transport_ice: shutdown on End Of File

Change-Id: I23bc4b136f6c546d58ba5771d3a9336d90fff5a8
parent 04373b89
......@@ -732,9 +732,16 @@ SipsIceTransport::eventLoop()
while (!stopLoop_) {
std::error_code err;
if (tls_ && tls_->waitForData(std::chrono::seconds(10), err)) {
if (stopLoop_)
break;
std::vector<uint8_t> pkt;
pkt.resize(PJSIP_MAX_PKT_LEN);
auto read = tls_->read(pkt.data(), PJSIP_MAX_PKT_LEN, err);
if (err == std::errc::broken_pipe || read == 0) {
JAMI_DBG("[SIPS] eof");
onTlsStateChange(TlsSessionState::SHUTDOWN);
break;
}
if (read > 0) {
pkt.resize(read);
std::lock_guard<std::mutex> l(rxMtx_);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment