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

Unified Diff: net/spdy/spdy_session.cc

Issue 14707005: SPDY - In CreateStream close the SpdySession if socket is not connected. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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 | net/spdy/spdy_session_spdy2_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_session.cc
===================================================================
--- net/spdy/spdy_session.cc (revision 195932)
+++ net/spdy/spdy_session.cc (working copy)
@@ -548,6 +548,20 @@
return ERR_SPDY_PROTOCOL_ERROR;
}
+ DCHECK(connection_->socket());
+ DCHECK(connection_->socket()->IsConnected());
+ if (connection_->socket()) {
+ UMA_HISTOGRAM_BOOLEAN("Net.SpdySession.CreateStreamWithSocketConnected",
+ connection_->socket()->IsConnected());
+ if (!connection_->socket()->IsConnected()) {
+ CloseSessionOnError(
+ ERR_CONNECTION_CLOSED,
+ true,
+ "Tried to create SPDY stream for a closed socket connection.");
+ return ERR_CONNECTION_CLOSED;
+ }
+ }
+
const std::string& path = request.url().PathForRequest();
*stream = new SpdyStream(this, path, request.priority(),
stream_initial_send_window_size_,
« no previous file with comments | « no previous file | net/spdy/spdy_session_spdy2_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698