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

Unified Diff: runtime/bin/http_impl.dart

Issue 10008072: Mark as closing, when we close the connection manually. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/http_impl.dart
diff --git a/runtime/bin/http_impl.dart b/runtime/bin/http_impl.dart
index d00db4f426080e0d21f19d9bd35747b45b419674..064975269f31e01201a537de3b8eada7e6d6fba3 100644
--- a/runtime/bin/http_impl.dart
+++ b/runtime/bin/http_impl.dart
@@ -493,6 +493,7 @@ class _HttpConnectionBase implements Hashable {
}
bool _close() {
+ _closing = true;
_socket.close();
}
@@ -508,7 +509,7 @@ class _HttpConnectionBase implements Hashable {
int parsed = _httpParser.writeList(buffer, 0, bytesRead);
if (parsed != bytesRead) {
// TODO(sgjesse): Error handling.
- _socket.close();
+ _close();
}
}
}
@@ -578,7 +579,7 @@ class _HttpConnection extends _HttpConnectionBase {
// If currently not processing any request just close the socket.
if (_httpParser.isIdle) {
- _socket.close();
+ _close();
if (onClosed != null && e == null) {
// Don't call onClosed if onError has been called.
onClosed();
@@ -682,7 +683,7 @@ class _HttpServer implements HttpServer {
}
_server = null;
for (_HttpConnection connection in _connections) {
- connection._socket.close();
+ connection._close();
}
_connections.clear();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698