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

Unified Diff: runtime/bin/eventhandler_win.cc

Issue 19675009: Close 'accepted' sockets when listening socket is closed. Fixes raw_server_socket_cancel_test. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove unused Socket.close, 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 | tests/standalone/io/raw_server_socket_cancel_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/eventhandler_win.cc
diff --git a/runtime/bin/eventhandler_win.cc b/runtime/bin/eventhandler_win.cc
index fc0522a3dc3c1a399f771ccdf256727f7e4edd3f..f6e91c43692a8ed2189b0c14319fdea8a9417895 100644
--- a/runtime/bin/eventhandler_win.cc
+++ b/runtime/bin/eventhandler_win.cc
@@ -435,6 +435,9 @@ void ListenSocket::AcceptComplete(IOBuffer* buffer, HANDLE completion_port) {
Log::PrintErr("setsockopt failed: %d\n", WSAGetLastError());
closesocket(buffer->client());
}
+ } else {
+ // Close the socket, as it's already accepted.
+ closesocket(buffer->client());
}
pending_accept_count_--;
« no previous file with comments | « no previous file | tests/standalone/io/raw_server_socket_cancel_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698