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

Side by Side Diff: webrtc/pc/channel.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/turnport.cc ('k') | 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 740 matching lines...) Expand 10 before | Expand all | Expand 10 after
751 751
752 ASSERT(false); 752 ASSERT(false);
753 return false; 753 return false;
754 } 754 }
755 755
756 // Bon voyage. 756 // Bon voyage.
757 int flags = (secure() && secure_dtls()) ? PF_SRTP_BYPASS : PF_NORMAL; 757 int flags = (secure() && secure_dtls()) ? PF_SRTP_BYPASS : PF_NORMAL;
758 int ret = channel->SendPacket(packet->data<char>(), packet->size(), 758 int ret = channel->SendPacket(packet->data<char>(), packet->size(),
759 updated_options, flags); 759 updated_options, flags);
760 if (ret != static_cast<int>(packet->size())) { 760 if (ret != static_cast<int>(packet->size())) {
761 if (channel->GetError() == EWOULDBLOCK) { 761 if (channel->GetError() == ENOTCONN) {
762 LOG(LS_WARNING) << "Got EWOULDBLOCK from socket."; 762 LOG(LS_WARNING) << "Got ENOTCONN from transport.";
763 SetReadyToSend(rtcp, false); 763 SetReadyToSend(rtcp, false);
764 } 764 }
765 return false; 765 return false;
766 } 766 }
767 return true; 767 return true;
768 } 768 }
769 769
770 bool BaseChannel::WantsPacket(bool rtcp, const rtc::CopyOnWriteBuffer* packet) { 770 bool BaseChannel::WantsPacket(bool rtcp, const rtc::CopyOnWriteBuffer* packet) {
771 // Protect ourselves against crazy data. 771 // Protect ourselves against crazy data.
772 if (!ValidPacket(rtcp, packet)) { 772 if (!ValidPacket(rtcp, packet)) {
(...skipping 1655 matching lines...) Expand 10 before | Expand all | Expand 10 after
2428 } 2428 }
2429 2429
2430 void DataChannel::OnStreamClosedRemotely(uint32_t sid) { 2430 void DataChannel::OnStreamClosedRemotely(uint32_t sid) {
2431 rtc::TypedMessageData<uint32_t>* message = 2431 rtc::TypedMessageData<uint32_t>* message =
2432 new rtc::TypedMessageData<uint32_t>(sid); 2432 new rtc::TypedMessageData<uint32_t>(sid);
2433 signaling_thread()->Post(RTC_FROM_HERE, this, MSG_STREAMCLOSEDREMOTELY, 2433 signaling_thread()->Post(RTC_FROM_HERE, this, MSG_STREAMCLOSEDREMOTELY,
2434 message); 2434 message);
2435 } 2435 }
2436 2436
2437 } // namespace cricket 2437 } // namespace cricket
OLDNEW
« no previous file with comments | « webrtc/p2p/base/turnport.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698