Skip to content

Commit

Permalink
fix: throw error if setting ice attributes fails
Browse files Browse the repository at this point in the history
  • Loading branch information
achingbrain committed Jun 13, 2024
1 parent 6276303 commit 41f4d88
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/impl/icetransport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,9 @@ IceTransport::IceTransport(const Configuration &config, candidate_callback candi
}

void IceTransport::setIceAttributes(string uFrag, string pwd) {
juice_set_local_ice_attributes(mAgent.get(), uFrag.c_str(), pwd.c_str());
if (juice_set_local_ice_attributes(mAgent.get(), uFrag.c_str(), pwd.c_str()) < 0) {
throw std::invalid_argument("Invalid ICE attributes");
}
}

void IceTransport::addIceServer(IceServer server) {
Expand Down

0 comments on commit 41f4d88

Please sign in to comment.