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

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

Issue 14864009: Keep track of when a socket has been destroyed (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove delete_handle marker. 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 | « sdk/lib/io/http.dart ('k') | sdk/lib/io/socket.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 4931831f86764d188263ec5eb74ea905b5d877e4..98a3cf9f5b093f1d2603299d3735274f6d2ef61b 100644
--- a/sdk/lib/io/http_impl.dart
+++ b/sdk/lib/io/http_impl.dart
@@ -1926,10 +1926,13 @@ class _HttpServer extends Stream<HttpRequest> implements HttpServer {
cancelOnError: cancelOnError);
}
- void close() {
+ Future close() {
closed = true;
+ Future result;
if (_serverSocket != null && _closeServer) {
- _serverSocket.close();
+ result = _serverSocket.close();
+ } else {
+ result = new Future.value();
}
if (_sessionManagerInstance != null) {
_sessionManagerInstance.close();
@@ -1939,6 +1942,7 @@ class _HttpServer extends Stream<HttpRequest> implements HttpServer {
connection.destroy();
}
_connections.clear();
+ return result;
}
int get port {
« no previous file with comments | « sdk/lib/io/http.dart ('k') | sdk/lib/io/socket.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698