diff options
author | trilene <trilene@runbox.com> | 2021-01-12 15:16:59 -0500 |
---|---|---|
committer | trilene <trilene@runbox.com> | 2021-01-12 15:16:59 -0500 |
commit | ebe61701d9fee4cb21788391b4106a9efc302323 (patch) | |
tree | 7b0d130e1db258a72285636d424719a5ab5c22c5 /src/CallManager.cpp | |
parent | Add call invite screen for mobile (diff) | |
download | nheko-ebe61701d9fee4cb21788391b4106a9efc302323.tar.xz |
Fix spurious call invite timeout
Diffstat (limited to 'src/CallManager.cpp')
-rw-r--r-- | src/CallManager.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/CallManager.cpp b/src/CallManager.cpp index f725d49f..0841a079 100644 --- a/src/CallManager.cpp +++ b/src/CallManager.cpp @@ -45,8 +45,9 @@ CallManager::CallManager(QObject *parent) nhlog::ui()->debug("WebRTC: call id: {} - sending offer", callid_); emit newMessage(roomid_, CallInvite{callid_, sdp, 0, timeoutms_}); emit newMessage(roomid_, CallCandidates{callid_, candidates, 0}); - QTimer::singleShot(timeoutms_, this, [this]() { - if (session_.state() == webrtc::State::OFFERSENT) { + std::string callid(callid_); + QTimer::singleShot(timeoutms_, this, [this, callid]() { + if (session_.state() == webrtc::State::OFFERSENT && callid == callid_) { hangUp(CallHangUp::Reason::InviteTimeOut); emit ChatPage::instance()->showNotification( "The remote side failed to pick up."); |