1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-02-13 20:01:56 +00:00

RTC: Fix the DTLS bug

This commit is contained in:
winlin 2020-07-03 10:46:35 +08:00
parent d453c6c22e
commit 34e7db5a93
2 changed files with 7 additions and 1 deletions

View file

@ -166,6 +166,11 @@ srs_error_t SrsSecurityTransport::on_dtls(char* data, int nb_data)
srs_error_t SrsSecurityTransport::on_dtls_handshake_done()
{
srs_error_t err = srs_success;
if (handshake_done) {
return err;
}
srs_trace("rtc session=%s, DTLS handshake done.", session_->id().c_str());
handshake_done = true;

View file

@ -390,7 +390,8 @@ srs_error_t SrsDtls::do_handshake()
int ssl_err = SSL_get_error(dtls, ret);
switch(ssl_err) {
case SSL_ERROR_NONE: {
case SSL_ERROR_NONE: {
handshake_done = true;
if ((callback == NULL) || ((err = callback->on_dtls_handshake_done()) != srs_success)) {
return srs_error_wrap(err, "dtls handshake done handle");
}