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

Unified Diff: content/browser/websockets/websocket_manager.cc

Issue 2343433002: WebSocket Mojo API: set reason when disconnecting a WebSocket interface because of insufficient res… (Closed)
Patch Set: . Created 4 years, 3 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 | third_party/WebKit/Source/modules/websockets/WebSocketHandleImpl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/websockets/websocket_manager.cc
diff --git a/content/browser/websockets/websocket_manager.cc b/content/browser/websockets/websocket_manager.cc
index 9bce39cdbb3ce94e94edfb8585aad93d93561b1a..7dfb2948d5d463b332a9318b7b6781d0b2971c23 100644
--- a/content/browser/websockets/websocket_manager.cc
+++ b/content/browser/websockets/websocket_manager.cc
@@ -108,8 +108,10 @@ void WebSocketManager::DoCreateWebSocket(
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
if (num_pending_connections_ >= kMaxPendingWebSocketConnections) {
- // Too many websockets! By returning here, we let |request| die, which
- // will be observed by the client as Mojo connection error.
+ // Too many websockets!
+ request.ResetWithReason(
+ blink::mojom::WebSocket::kInsufficientResources,
+ "Error in connection establishment: net::ERR_INSUFFICIENT_RESOURCES");
return;
}
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/websockets/WebSocketHandleImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698