Skip to content

Commit

Permalink
Merge branch 'bugfix/dtls-fragment' into feature/upgrade-pion
Browse files Browse the repository at this point in the history
  • Loading branch information
winlinvip committed Jun 4, 2023
2 parents f773556 + bcb62ee commit 67d8e93
Show file tree
Hide file tree
Showing 3 changed files with 148 additions and 261 deletions.
5 changes: 3 additions & 2 deletions trunk/src/app/srs_app_rtc_conn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2240,11 +2240,12 @@ srs_error_t SrsRtcConnection::on_dtls_alert(std::string type, std::string desc)
srs_error_t err = srs_success;

// CN(Close Notify) is sent when client close the PeerConnection.
if (type == "warning" && desc == "CN") {
// fatal, IP(Illegal Parameter) is sent when DTLS failed.
if (type == "fatal" || (type == "warning" && desc == "CN")) {
SrsContextRestore(_srs_context->get_id());
switch_to_context();

srs_trace("RTC: session destroy by DTLS alert, username=%s", username_.c_str());
srs_trace("RTC: session destroy by DTLS alert(%s %s), username=%s", type.c_str(), desc.c_str(), username_.c_str());
_srs_rtc_manager->remove(this);
}

Expand Down
Loading

0 comments on commit 67d8e93

Please sign in to comment.