fix a leak in janus connector
This commit is contained in:
parent
6dc15c611b
commit
68a5798cf9
@ -231,8 +231,7 @@ void JanusConnector::onReadyRead()
|
|||||||
foreach (WebRtcSession *session, m_sessions) {
|
foreach (WebRtcSession *session, m_sessions) {
|
||||||
if (session->matchJanusSessionId(sessionId)) {
|
if (session->matchJanusSessionId(sessionId)) {
|
||||||
qCDebug(dcJanus()) << "Session" << session << "timed out. Removing session";
|
qCDebug(dcJanus()) << "Session" << session << "timed out. Removing session";
|
||||||
m_sessions.remove(session->sessionId);
|
delete m_sessions.take(session->sessionId);
|
||||||
delete session;
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -268,7 +267,7 @@ void JanusConnector::onReadyRead()
|
|||||||
hangup.insert("type", "hangup");
|
hangup.insert("type", "hangup");
|
||||||
hangup.insert("reason", map.value("reason").toString());
|
hangup.insert("reason", map.value("reason").toString());
|
||||||
emit webRtcHandshakeMessageReceived(session->sessionId, hangup);
|
emit webRtcHandshakeMessageReceived(session->sessionId, hangup);
|
||||||
m_sessions.remove(session->sessionId);
|
delete m_sessions.take(session->sessionId);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user