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

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

Issue 11364122: Do *not* report connection reset by peer as an error on an http server (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month 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_advanced_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 0af8979116183deba7c7cfab6b392d96d84b3148..19dda9753114bcb68e848777fccd7f9040b2644a 100644
--- a/sdk/lib/io/http_impl.dart
+++ b/sdk/lib/io/http_impl.dart
@@ -1413,8 +1413,12 @@ class _HttpConnection extends _HttpConnectionBase {
// If currently not processing any request close the socket when
// we are done writing the response.
if (_httpParser.isIdle) {
+ // If the httpParser is idle and we get an error from the
+ // connection we deal with that as a closed connection and not
+ // as an error. When the client disappears we get a connection
+ // reset by peer and that is OK.
if (e != null) {
- onError(e);
+ onClosed();
} else {
_socket.outputStream.onClosed = () {
_destroy();
« no previous file with comments | « no previous file | tests/standalone/io/http_advanced_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698