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

Unified Diff: content/browser/renderer_host/p2p/socket_host_udp.cc

Issue 14704005: UDP transient errors should not be fatal (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: done Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/p2p/socket_host_udp.cc
diff --git a/content/browser/renderer_host/p2p/socket_host_udp.cc b/content/browser/renderer_host/p2p/socket_host_udp.cc
index 68718c2c68081b2e47df4325ad76c986fa549734..24bb768e5011284be19571fcda4f233105dced26 100644
--- a/content/browser/renderer_host/p2p/socket_host_udp.cc
+++ b/content/browser/renderer_host/p2p/socket_host_udp.cc
@@ -17,11 +17,23 @@ namespace {
const int kReadBufferSize = 65536;
// Defines set of transient errors. These errors are ignored when we get them
-// from sendto() calls.
+// from sendto() or recvfrom() calls.
+//
+// net::ERR_OUT_OF_MEMORY
+//
+// This is caused by ENOBUFS which means the buffer of the network interface
+// is full.
+//
+// net::ERR_CONNECTION_RESET
+//
+// This is caused by WSAENETRESET or WSAECONNRESET which means the
+// last send resulted in an "ICMP Port Unreachable" message.
bool IsTransientError(int error) {
return error == net::ERR_ADDRESS_UNREACHABLE ||
error == net::ERR_ADDRESS_INVALID ||
- error == net::ERR_ACCESS_DENIED;
+ error == net::ERR_ACCESS_DENIED ||
+ error == net::ERR_CONNECTION_RESET ||
+ error == net::ERR_OUT_OF_MEMORY;
}
} // namespace
« 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