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

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

Issue 12213010: New implementation of {,Linked}Hash{Set,Map}. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address review comments, fix bugs. Created 7 years, 10 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
Index: sdk/lib/io/http_impl.dart
diff --git a/sdk/lib/io/http_impl.dart b/sdk/lib/io/http_impl.dart
index efa341c3d305ba48c50372cc1835fb6930b7c868..a8334da970c126ca0fdba80d23f5dfe42049c8bd 100644
--- a/sdk/lib/io/http_impl.dart
+++ b/sdk/lib/io/http_impl.dart
@@ -1917,14 +1917,15 @@ class _HttpClient implements HttpClient {
void shutdown({bool force: false}) {
if (force) _closeQueue.shutdown();
- _openSockets.forEach((String key, Queue<_SocketConnection> connections) {
+ new Map.from(_openSockets).forEach(
+ (String key, Queue<_SocketConnection> connections) {
while (!connections.isEmpty) {
_SocketConnection socketConn = connections.removeFirst();
socketConn._socket.close();
}
});
if (force) {
- _activeSockets.forEach((_SocketConnection socketConn) {
+ _activeSockets.toList().forEach((_SocketConnection socketConn) {
socketConn._httpClientConnection._onClientShutdown();
socketConn._close();
});

Powered by Google App Engine
This is Rietveld 408576698