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

Unified Diff: net/spdy/spdy_session_pool.cc

Issue 321513002: SpdySession go-away on network change (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix IPAddressChanged. Created 6 years, 6 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 | « net/spdy/spdy_session.cc ('k') | net/spdy/spdy_session_pool_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_session_pool.cc
diff --git a/net/spdy/spdy_session_pool.cc b/net/spdy/spdy_session_pool.cc
index 66d907dbda439918c8228675b6659d1489cb0792..d523e10198660129645de75a7b25483bc44150e0 100644
--- a/net/spdy/spdy_session_pool.cc
+++ b/net/spdy/spdy_session_pool.cc
@@ -278,11 +278,14 @@ void SpdySessionPool::OnIPAddressChanged() {
if (!*it)
continue;
- // For OSs that terminate TCP connections upon relevant network changes
- // there is no need to explicitly close SpdySessions, instead simply mark
- // the sessions as deprecated so they aren't reused.
+// For OSs that terminate TCP connections upon relevant network changes,
+// attempt to preserve active streams by marking all sessions as going
+// away, rather than explicitly closing them. Streams may still fail due
+// to a generated TCP reset.
#if defined(OS_ANDROID) || defined(OS_WIN) || defined(OS_IOS)
(*it)->MakeUnavailable();
+ (*it)->StartGoingAway(kLastStreamId, OK);
+ (*it)->MaybeFinishGoingAway();
#else
(*it)->CloseSessionOnError(ERR_NETWORK_CHANGED,
"Closing current sessions.");
« no previous file with comments | « net/spdy/spdy_session.cc ('k') | net/spdy/spdy_session_pool_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698