Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(305)

Side by Side Diff: webrtc/p2p/base/port.cc

Issue 2068263003: Do not delete a connection in the turn port with permission error or refresh error. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Merge with head Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 1072 matching lines...) Expand 10 before | Expand all | Expand 10 after
1083 void Connection::Destroy() { 1083 void Connection::Destroy() {
1084 LOG_J(LS_VERBOSE, this) << "Connection destroyed"; 1084 LOG_J(LS_VERBOSE, this) << "Connection destroyed";
1085 port_->thread()->Post(RTC_FROM_HERE, this, MSG_DELETE); 1085 port_->thread()->Post(RTC_FROM_HERE, this, MSG_DELETE);
1086 } 1086 }
1087 1087
1088 void Connection::FailAndDestroy() { 1088 void Connection::FailAndDestroy() {
1089 set_state(Connection::STATE_FAILED); 1089 set_state(Connection::STATE_FAILED);
1090 Destroy(); 1090 Destroy();
1091 } 1091 }
1092 1092
1093 void Connection::FailAndPrune() {
1094 set_state(Connection::STATE_FAILED);
1095 Prune();
1096 }
1097
1093 void Connection::PrintPingsSinceLastResponse(std::string* s, size_t max) { 1098 void Connection::PrintPingsSinceLastResponse(std::string* s, size_t max) {
1094 std::ostringstream oss; 1099 std::ostringstream oss;
1095 oss << std::boolalpha; 1100 oss << std::boolalpha;
1096 if (pings_since_last_response_.size() > max) { 1101 if (pings_since_last_response_.size() > max) {
1097 for (size_t i = 0; i < max; i++) { 1102 for (size_t i = 0; i < max; i++) {
1098 const SentPing& ping = pings_since_last_response_[i]; 1103 const SentPing& ping = pings_since_last_response_[i];
1099 oss << rtc::hex_encode(ping.id) << " "; 1104 oss << rtc::hex_encode(ping.id) << " ";
1100 } 1105 }
1101 oss << "... " << (pings_since_last_response_.size() - max) << " more"; 1106 oss << "... " << (pings_since_last_response_.size() - max) << " more";
1102 } else { 1107 } else {
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
1531 ASSERT(sent < 0); 1536 ASSERT(sent < 0);
1532 error_ = port_->GetError(); 1537 error_ = port_->GetError();
1533 stats_.sent_discarded_packets++; 1538 stats_.sent_discarded_packets++;
1534 } else { 1539 } else {
1535 send_rate_tracker_.AddSamples(sent); 1540 send_rate_tracker_.AddSamples(sent);
1536 } 1541 }
1537 return sent; 1542 return sent;
1538 } 1543 }
1539 1544
1540 } // namespace cricket 1545 } // namespace cricket
OLDNEW
« no previous file with comments | « webrtc/p2p/base/port.h ('k') | webrtc/p2p/base/turnport.h » ('j') | webrtc/p2p/base/turnport.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698