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

Unified Diff: runtime/bin/socket_patch.dart

Issue 204343003: Close(destroy) Socket on user-generated write error. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 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/socket_invalid_arguments_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/socket_patch.dart
diff --git a/runtime/bin/socket_patch.dart b/runtime/bin/socket_patch.dart
index 144696d9119f34fe48c02a6f73d13f21e1530f84..0e7abdb4bf98b0f310f54bf90f848b97838de460 100644
--- a/runtime/bin/socket_patch.dart
+++ b/runtime/bin/socket_patch.dart
@@ -1345,13 +1345,13 @@ class _SocketStreamConsumer extends StreamConsumer<List<int>> {
try {
write();
} catch (e) {
+ socket.destroy();
stop();
- socket._consumerDone();
done(e);
}
},
onError: (error, [stackTrace]) {
- socket._consumerDone();
+ socket.destroy();
done(error, stackTrace);
},
onDone: () {
« no previous file with comments | « no previous file | tests/standalone/io/socket_invalid_arguments_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698