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

Unified Diff: runtime/bin/http_impl.dart

Issue 10050007: Address additional comments from http://codereview.chromium.org/9956062/ (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 8c41b8b4576b2aaae171bb81079cc154e3486591..d00db4f426080e0d21f19d9bd35747b45b419674 100644
--- a/runtime/bin/http_impl.dart
+++ b/runtime/bin/http_impl.dart
@@ -481,13 +481,13 @@ class _HttpConnectionBase implements Hashable {
}
bool _write(List<int> data, [bool copyBuffer = false]) {
- if (!_error) {
+ if (!_error && !_closing) {
return _socket.outputStream.write(data, copyBuffer);
}
}
bool _writeFrom(List<int> buffer, [int offset, int len]) {
- if (!_error) {
+ if (!_error && !_closing) {
return _socket.outputStream.writeFrom(buffer, offset, len);
}
}
@@ -514,6 +514,7 @@ class _HttpConnectionBase implements Hashable {
}
void _onClosed() {
+ _closing = true;
_onConnectionClosed(null);
}
@@ -589,7 +590,6 @@ class _HttpConnection extends _HttpConnectionBase {
if (e == null) {
// Indicate connection close to the HTTP parser.
_httpParser.connectionClosed();
- _closing = true;
}
}
« 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