From 063c06680284725aae1f6c1094cf35a4dd2f6193 Mon Sep 17 00:00:00 2001 From: winlin Date: Mon, 27 Jul 2020 12:52:46 +0800 Subject: [PATCH] RTC: Refine log --- trunk/src/app/srs_app_rtc_conn.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/trunk/src/app/srs_app_rtc_conn.cpp b/trunk/src/app/srs_app_rtc_conn.cpp index 131746a94..ed0341edf 100644 --- a/trunk/src/app/srs_app_rtc_conn.cpp +++ b/trunk/src/app/srs_app_rtc_conn.cpp @@ -1946,13 +1946,7 @@ void SrsRtcConnection::update_sendonly_socket(SrsUdpMuxSocket* skt) } } - // If no cache, build cache and setup the relations in connection. - if (!addr_cache) { - peer_addresses_[peer_id] = addr_cache = skt->copy_sendonly(); - server_->insert_into_id_sessions(peer_id, this); - } - - // Detect address change. + // Show address change log. if (prev_peer_id.empty()) { srs_trace("RTC: session address init %s", peer_id.c_str()); } else if (pp_address_change->can_print(skt->get_peer_port())) { @@ -1960,6 +1954,12 @@ void SrsRtcConnection::update_sendonly_socket(SrsUdpMuxSocket* skt) peer_id.c_str(), (addr_cache? 1:0), pp_address_change->nn_count, peer_addresses_.size()); } + // If no cache, build cache and setup the relations in connection. + if (!addr_cache) { + peer_addresses_[peer_id] = addr_cache = skt->copy_sendonly(); + server_->insert_into_id_sessions(peer_id, this); + } + // Update the transport. sendonly_skt = addr_cache; }