Chromium Code Reviews| Index: dart/runtime/bin/eventhandler_win.cc |
| diff --git a/dart/runtime/bin/eventhandler_win.cc b/dart/runtime/bin/eventhandler_win.cc |
| index e5d2263e942be120a21d280175653e18d8883702..73c738d9b397bd2c443bba1aad0f867c07308f84 100644 |
| --- a/dart/runtime/bin/eventhandler_win.cc |
| +++ b/dart/runtime/bin/eventhandler_win.cc |
| @@ -1018,7 +1018,8 @@ void EventHandlerImplementation::HandleInterrupt(InterruptMessage* msg) { |
| listen_socket->SetPortAndMask(msg->dart_port, events); |
| TryDispatchingPendingAccepts(listen_socket); |
| } else if (IS_COMMAND(msg->data, kCloseCommand)) { |
| - listen_socket->SetPortAndMask(msg->dart_port, 0); |
| + listen_socket->RemovePort(msg->dart_port); |
| + |
| // We only close the socket file descriptor from the operating |
| // system if there are no other dart socket objects which |
| // are listening on the same (address, port) combination. |
| @@ -1030,6 +1031,8 @@ void EventHandlerImplementation::HandleInterrupt(InterruptMessage* msg) { |
| listen_socket->Close(); |
| DeleteIfClosed(handle); |
| } |
| + |
| + DartUtils::PostInt32(msg->dart_port, 1 << kDestroyedEvent); |
|
Søren Gjesse
2015/02/11 11:31:21
DeleteIfClosed above sends a destroy event when th
kustermann
2015/02/11 11:32:56
No it should not. Since we remove the port with `l
|
| } else { |
| UNREACHABLE(); |
| } |