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

Side by Side Diff: webrtc/p2p/base/relayport.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/port_unittest.cc ('k') | webrtc/p2p/base/tcpport.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 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 #include <algorithm> 10 #include <algorithm>
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 entries_.push_back(entry); 337 entries_.push_back(entry);
338 } 338 }
339 339
340 // If the entry is connected, then we can send on it (though wrapping may 340 // If the entry is connected, then we can send on it (though wrapping may
341 // still be necessary). Otherwise, we can't yet use this connection, so we 341 // still be necessary). Otherwise, we can't yet use this connection, so we
342 // default to the first one. 342 // default to the first one.
343 if (!entry || !entry->connected()) { 343 if (!entry || !entry->connected()) {
344 ASSERT(!entries_.empty()); 344 ASSERT(!entries_.empty());
345 entry = entries_[0]; 345 entry = entries_[0];
346 if (!entry->connected()) { 346 if (!entry->connected()) {
347 error_ = EWOULDBLOCK; 347 error_ = ENOTCONN;
348 return SOCKET_ERROR; 348 return SOCKET_ERROR;
349 } 349 }
350 } 350 }
351 351
352 // Send the actual contents to the server using the usual mechanism. 352 // Send the actual contents to the server using the usual mechanism.
353 int sent = entry->SendTo(data, size, addr, options); 353 int sent = entry->SendTo(data, size, addr, options);
354 if (sent <= 0) { 354 if (sent <= 0) {
355 ASSERT(sent < 0); 355 ASSERT(sent < 0);
356 error_ = entry->GetError(); 356 error_ = entry->GetError();
357 return SOCKET_ERROR; 357 return SOCKET_ERROR;
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after
837 if (rtc::TimeMillis() - start_time_ <= kRetryTimeout) 837 if (rtc::TimeMillis() - start_time_ <= kRetryTimeout)
838 entry_->ScheduleKeepAlive(); 838 entry_->ScheduleKeepAlive();
839 } 839 }
840 840
841 void AllocateRequest::OnTimeout() { 841 void AllocateRequest::OnTimeout() {
842 LOG(INFO) << "Allocate request timed out"; 842 LOG(INFO) << "Allocate request timed out";
843 entry_->HandleConnectFailure(connection_->socket()); 843 entry_->HandleConnectFailure(connection_->socket());
844 } 844 }
845 845
846 } // namespace cricket 846 } // namespace cricket
OLDNEW
« no previous file with comments | « webrtc/p2p/base/port_unittest.cc ('k') | webrtc/p2p/base/tcpport.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698