mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-26 04:58:49 +03:00
Fix spurious call invite timeout
This commit is contained in:
parent
a85823b68a
commit
ebe61701d9
1 changed files with 3 additions and 2 deletions
|
@ -45,8 +45,9 @@ CallManager::CallManager(QObject *parent)
|
||||||
nhlog::ui()->debug("WebRTC: call id: {} - sending offer", callid_);
|
nhlog::ui()->debug("WebRTC: call id: {} - sending offer", callid_);
|
||||||
emit newMessage(roomid_, CallInvite{callid_, sdp, 0, timeoutms_});
|
emit newMessage(roomid_, CallInvite{callid_, sdp, 0, timeoutms_});
|
||||||
emit newMessage(roomid_, CallCandidates{callid_, candidates, 0});
|
emit newMessage(roomid_, CallCandidates{callid_, candidates, 0});
|
||||||
QTimer::singleShot(timeoutms_, this, [this]() {
|
std::string callid(callid_);
|
||||||
if (session_.state() == webrtc::State::OFFERSENT) {
|
QTimer::singleShot(timeoutms_, this, [this, callid]() {
|
||||||
|
if (session_.state() == webrtc::State::OFFERSENT && callid == callid_) {
|
||||||
hangUp(CallHangUp::Reason::InviteTimeOut);
|
hangUp(CallHangUp::Reason::InviteTimeOut);
|
||||||
emit ChatPage::instance()->showNotification(
|
emit ChatPage::instance()->showNotification(
|
||||||
"The remote side failed to pick up.");
|
"The remote side failed to pick up.");
|
||||||
|
|
Loading…
Reference in a new issue