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

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

Issue 2192963002: Don't stop sending media on EWOULDBLOCK (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Don't stop sending media on EWOULDBLOCK Created 4 years, 4 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 | « webrtc/p2p/base/tcpport.cc ('k') | webrtc/pc/channel.cc » ('j') | 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 2012 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2012 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 500 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 const rtc::PacketOptions& options, 511 const rtc::PacketOptions& options,
512 bool payload) { 512 bool payload) {
513 // Try to find an entry for this specific address; we should have one. 513 // Try to find an entry for this specific address; we should have one.
514 TurnEntry* entry = FindEntry(addr); 514 TurnEntry* entry = FindEntry(addr);
515 if (!entry) { 515 if (!entry) {
516 LOG(LS_ERROR) << "Did not find the TurnEntry for address " << addr; 516 LOG(LS_ERROR) << "Did not find the TurnEntry for address " << addr;
517 return 0; 517 return 0;
518 } 518 }
519 519
520 if (!ready()) { 520 if (!ready()) {
521 error_ = EWOULDBLOCK; 521 error_ = ENOTCONN;
522 return SOCKET_ERROR; 522 return SOCKET_ERROR;
523 } 523 }
524 524
525 // Send the actual contents to the server using the usual mechanism. 525 // Send the actual contents to the server using the usual mechanism.
526 int sent = entry->Send(data, size, payload, options); 526 int sent = entry->Send(data, size, payload, options);
527 if (sent <= 0) { 527 if (sent <= 0) {
528 return SOCKET_ERROR; 528 return SOCKET_ERROR;
529 } 529 }
530 530
531 // The caller of the function is expecting the number of user data bytes, 531 // The caller of the function is expecting the number of user data bytes,
(...skipping 1002 matching lines...) Expand 10 before | Expand all | Expand 10 after
1534 } else { 1534 } else {
1535 state_ = STATE_UNBOUND; 1535 state_ = STATE_UNBOUND;
1536 port_->FailAndPruneConnection(ext_addr_); 1536 port_->FailAndPruneConnection(ext_addr_);
1537 } 1537 }
1538 } 1538 }
1539 void TurnEntry::OnChannelBindTimeout() { 1539 void TurnEntry::OnChannelBindTimeout() {
1540 state_ = STATE_UNBOUND; 1540 state_ = STATE_UNBOUND;
1541 port_->FailAndPruneConnection(ext_addr_); 1541 port_->FailAndPruneConnection(ext_addr_);
1542 } 1542 }
1543 } // namespace cricket 1543 } // namespace cricket
OLDNEW
« no previous file with comments | « webrtc/p2p/base/tcpport.cc ('k') | webrtc/pc/channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698