diff --git a/src/ringdht/ringaccount.cpp b/src/ringdht/ringaccount.cpp index a4439285bf1e04c0904d0b81253a25726d049e4b..9f28d891c7b91a610d88672c2039fad862228f12 100644 --- a/src/ringdht/ringaccount.cpp +++ b/src/ringdht/ringaccount.cpp @@ -250,7 +250,10 @@ RingAccount::newOutgoingCall(const std::string& toUrl) std::string(msg.ice_data.cbegin(), msg.ice_data.cend()).c_str()); if (auto call = weak_call.lock()) call->setState(Call::ConnectionState::PROGRESSING); - ice->start(msg.ice_data); + if (!ice->start(msg.ice_data)) { + call->onFailure(); + return true; + } return false; } ); @@ -1005,7 +1008,10 @@ RingAccount::incomingCall(dht::IceCandidates&& msg) shared_this->dht_.cancelPut(shared_this->callKey_, vid); } ); - ice->start(msg.ice_data); + if (!ice->start(msg.ice_data)) { + call->onFailure(); + return; + } call->setPeerNumber(from); call->initRecFilename(from); {