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

Side by Side Diff: net/spdy/spdy_session_pool.cc

Issue 328823003: Ensure SpdySession::StartGoingAway is always called with an error. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove extraneous StartGoingAway 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/spdy/spdy_session.cc ('k') | net/spdy/spdy_session_pool_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/spdy/spdy_session_pool.h" 5 #include "net/spdy/spdy_session_pool.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "net/base/address_list.h" 10 #include "net/base/address_list.h"
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 it != current_sessions.end(); ++it) { 277 it != current_sessions.end(); ++it) {
278 if (!*it) 278 if (!*it)
279 continue; 279 continue;
280 280
281 // For OSs that terminate TCP connections upon relevant network changes, 281 // For OSs that terminate TCP connections upon relevant network changes,
282 // attempt to preserve active streams by marking all sessions as going 282 // attempt to preserve active streams by marking all sessions as going
283 // away, rather than explicitly closing them. Streams may still fail due 283 // away, rather than explicitly closing them. Streams may still fail due
284 // to a generated TCP reset. 284 // to a generated TCP reset.
285 #if defined(OS_ANDROID) || defined(OS_WIN) || defined(OS_IOS) 285 #if defined(OS_ANDROID) || defined(OS_WIN) || defined(OS_IOS)
286 (*it)->MakeUnavailable(); 286 (*it)->MakeUnavailable();
287 (*it)->StartGoingAway(kLastStreamId, OK); 287 (*it)->StartGoingAway(kLastStreamId, ERR_NETWORK_CHANGED);
288 (*it)->MaybeFinishGoingAway(); 288 (*it)->MaybeFinishGoingAway();
289 #else 289 #else
290 (*it)->CloseSessionOnError(ERR_NETWORK_CHANGED, 290 (*it)->CloseSessionOnError(ERR_NETWORK_CHANGED,
291 "Closing current sessions."); 291 "Closing current sessions.");
292 DCHECK((*it)->IsDraining()); 292 DCHECK((*it)->IsDraining());
293 #endif // defined(OS_ANDROID) || defined(OS_WIN) || defined(OS_IOS) 293 #endif // defined(OS_ANDROID) || defined(OS_WIN) || defined(OS_IOS)
294 DCHECK(!IsSessionAvailable(*it)); 294 DCHECK(!IsSessionAvailable(*it));
295 } 295 }
296 http_server_properties_->ClearAllSpdySettings(); 296 http_server_properties_->ClearAllSpdySettings();
297 } 297 }
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 395
396 if (idle_only && (*it)->is_active()) 396 if (idle_only && (*it)->is_active())
397 continue; 397 continue;
398 398
399 (*it)->CloseSessionOnError(error, description); 399 (*it)->CloseSessionOnError(error, description);
400 DCHECK(!IsSessionAvailable(*it)); 400 DCHECK(!IsSessionAvailable(*it));
401 } 401 }
402 } 402 }
403 403
404 } // namespace net 404 } // namespace net
OLDNEW
« 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