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

Unified Diff: net/socket_stream/socket_stream.cc

Issue 7185032: WebSocket over SPDY: WebSocketJob handling SpdyWebSocketStream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: leak fixed (don't call AddRef) Created 9 years, 5 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 | net/socket_stream/socket_stream_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket_stream/socket_stream.cc
diff --git a/net/socket_stream/socket_stream.cc b/net/socket_stream/socket_stream.cc
index 4c5b13a27fb4555d43efee63e2ea8661de373129..d89c074a061fe00a0db631fdbeab487b541c93f6 100644
--- a/net/socket_stream/socket_stream.cc
+++ b/net/socket_stream/socket_stream.cc
@@ -290,14 +290,14 @@ void SocketStream::Finish(int result) {
result = ERR_CONNECTION_CLOSED;
DCHECK_EQ(next_state_, STATE_NONE);
DVLOG(1) << "Finish result=" << ErrorToString(result);
- if (delegate_)
- delegate_->OnError(this, result);
metrics_->OnClose();
Delegate* delegate = delegate_;
delegate_ = NULL;
if (delegate) {
- delegate->OnClose(this);
+ delegate->OnError(this, result);
+ if (result != ERR_PROTOCOL_SWITCHED)
+ delegate->OnClose(this);
}
Release();
}
« no previous file with comments | « no previous file | net/socket_stream/socket_stream_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698