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

Unified Diff: extensions/browser/api/sockets_udp/udp_socket_event_dispatcher.cc

Issue 2017113002: [Extensions] DCHECK that ExtensionFunctions respond (and only once) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | « extensions/browser/api/socket/udp_socket.cc ('k') | extensions/browser/api/test/test_api.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/api/sockets_udp/udp_socket_event_dispatcher.cc
diff --git a/extensions/browser/api/sockets_udp/udp_socket_event_dispatcher.cc b/extensions/browser/api/sockets_udp/udp_socket_event_dispatcher.cc
index 33f3fc7e910312f3fe8ccfc727e5d0f46a323b33..3d98c94bbc0701260fce2dd9ee3d221846f33f4c 100644
--- a/extensions/browser/api/sockets_udp/udp_socket_event_dispatcher.cc
+++ b/extensions/browser/api/sockets_udp/udp_socket_event_dispatcher.cc
@@ -135,6 +135,9 @@ void UDPSocketEventDispatcher::ReceiveCallback(
} else if (bytes_read == net::ERR_IO_PENDING) {
// This happens when resuming a socket which already had an
// active "recv" callback.
+ } else if (bytes_read == net::ERR_CONNECTION_CLOSED) {
+ // This happens when the socket closes, which is expected since we
+ // continually add a receive listener in the success block above.
} else {
// Dispatch "onReceiveError" event but don't start another read to avoid
// potential infinite reads if we have a persistent network error.
« no previous file with comments | « extensions/browser/api/socket/udp_socket.cc ('k') | extensions/browser/api/test/test_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698