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

Unified Diff: sdk/lib/io/http_impl.dart

Issue 14840009: Clear http session object on destroy. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
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 | tests/standalone/io/http_session_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/http_impl.dart
diff --git a/sdk/lib/io/http_impl.dart b/sdk/lib/io/http_impl.dart
index fcb55bca2bb4e082dd0b4a28ad50f6b6c6cc03b8..ee855ec8661e76acc5bd920272ab9938bce258f8 100644
--- a/sdk/lib/io/http_impl.dart
+++ b/sdk/lib/io/http_impl.dart
@@ -128,6 +128,12 @@ class _HttpRequest extends _HttpInboundMessage implements HttpRequest {
HttpSession get session {
if (_session != null) {
+ if (_session._destroyed) {
+ // It's destroyed, clear it.
+ _session = null;
+ // Create new session object by calling recursive.
+ return session;
+ }
// It's already mapped, use it.
return _session;
}
« no previous file with comments | « no previous file | tests/standalone/io/http_session_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698