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

Unified Diff: runtime/bin/socket_patch.dart

Issue 19494012: Report correct socket error and use HttpServer:close future in pub. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 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 | sdk/lib/_internal/pub/lib/src/utils.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 c24ba4df3a531f3b84ec142a5205352fa9daac19..0bcf75fd0a2899163b5f00e3fb5bf40447e70c3a 100644
--- a/runtime/bin/socket_patch.dart
+++ b/runtime/bin/socket_patch.dart
@@ -303,6 +303,7 @@ class _NativeSocket extends NativeFieldWrapperClass1 {
if (result is OSError) {
throw createError(result, "Connection failed", address, port);
} else {
+ socket.port; // Query the local port, for error messages.
var completer = new Completer();
// Setup handlers for receiving the first write event which
// indicate that the socket is fully connected.
@@ -313,8 +314,7 @@ class _NativeSocket extends NativeFieldWrapperClass1 {
},
error: (e) {
socket.close();
- completer.completeError(
- createError(e, "Connection failed", address, port));
+ completer.completeError(e);
}
);
socket.setListening(read: false, write: true);
« no previous file with comments | « no previous file | sdk/lib/_internal/pub/lib/src/utils.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698