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

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

Issue 2327233002: Removing assert error when we fail to create a connection for a ping from an unknown address (Closed)
Patch Set: Add comments Created 4 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 630 matching lines...) Expand 10 before | Expand all | Expand 10 after
641 port->SendBindingErrorResponse(stun_msg, address, 641 port->SendBindingErrorResponse(stun_msg, address,
642 STUN_ERROR_SERVER_ERROR, 642 STUN_ERROR_SERVER_ERROR,
643 STUN_ERROR_REASON_SERVER_ERROR); 643 STUN_ERROR_REASON_SERVER_ERROR);
644 return; 644 return;
645 } 645 }
646 } 646 }
647 647
648 Connection* connection = 648 Connection* connection =
649 port->CreateConnection(remote_candidate, PortInterface::ORIGIN_THIS_PORT); 649 port->CreateConnection(remote_candidate, PortInterface::ORIGIN_THIS_PORT);
650 if (!connection) { 650 if (!connection) {
651 ASSERT(false); 651 // This could happen in some scenarios. For example, a TurnPort may have
652 // had a refresh request timeout, so it won't create connections.
652 port->SendBindingErrorResponse(stun_msg, address, STUN_ERROR_SERVER_ERROR, 653 port->SendBindingErrorResponse(stun_msg, address, STUN_ERROR_SERVER_ERROR,
653 STUN_ERROR_REASON_SERVER_ERROR); 654 STUN_ERROR_REASON_SERVER_ERROR);
654 return; 655 return;
655 } 656 }
656 657
657 LOG(LS_INFO) << "Adding connection from " 658 LOG(LS_INFO) << "Adding connection from "
658 << (remote_candidate_is_new ? "peer reflexive" : "resurrected") 659 << (remote_candidate_is_new ? "peer reflexive" : "resurrected")
659 << " candidate: " << remote_candidate.ToString(); 660 << " candidate: " << remote_candidate.ToString();
660 AddConnection(connection); 661 AddConnection(connection);
661 connection->HandleBindingRequest(stun_msg); 662 connection->HandleBindingRequest(stun_msg);
(...skipping 1298 matching lines...) Expand 10 before | Expand all | Expand 10 after
1960 1961
1961 // During the initial state when nothing has been pinged yet, return the first 1962 // During the initial state when nothing has been pinged yet, return the first
1962 // one in the ordered |connections_|. 1963 // one in the ordered |connections_|.
1963 return *(std::find_if(connections_.begin(), connections_.end(), 1964 return *(std::find_if(connections_.begin(), connections_.end(),
1964 [conn1, conn2](Connection* conn) { 1965 [conn1, conn2](Connection* conn) {
1965 return conn == conn1 || conn == conn2; 1966 return conn == conn1 || conn == conn2;
1966 })); 1967 }));
1967 } 1968 }
1968 1969
1969 } // namespace cricket 1970 } // namespace cricket
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698