mirror of
https://git.jami.net/savoirfairelinux/jami-daemon.git
synced 2025-08-12 22:09:25 +08:00
sips_transport_ice: shutdown on End Of File
Change-Id: I23bc4b136f6c546d58ba5771d3a9336d90fff5a8
This commit is contained in:
@ -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_);
|
||||
|
Reference in New Issue
Block a user