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

Unified Diff: net/websockets/websocket_stream.cc

Issue 105833003: Fail WebSocket channel when handshake fails. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years 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
Index: net/websockets/websocket_stream.cc
diff --git a/net/websockets/websocket_stream.cc b/net/websockets/websocket_stream.cc
index e81c24e706e702c83d152bd5671f75c27b90d78b..0c0a740f2dc021b27963c3c5095199ee34e4864e 100644
--- a/net/websockets/websocket_stream.cc
+++ b/net/websockets/websocket_stream.cc
@@ -70,7 +70,10 @@ class StreamRequestImpl : public WebSocketStreamRequest {
}
void ReportFailure() {
- connect_delegate_->OnFailure(kWebSocketErrorAbnormalClosure);
+ std::string failure_message;
+ if (create_helper_->stream())
Adam Rice 2013/12/06 07:02:31 Calling url_request_.status().error() can give you
yhirano 2013/12/06 08:54:56 Done.
+ failure_message = create_helper_->stream()->FailureMessage();
+ connect_delegate_->OnFailure(failure_message);
}
private:

Powered by Google App Engine
This is Rietveld 408576698