| Index: runtime/bin/eventhandler_win.cc
|
| diff --git a/runtime/bin/eventhandler_win.cc b/runtime/bin/eventhandler_win.cc
|
| index f9887128c49ef4dae66c19b26a38a1b51555da7b..bd4af3155d92af7e07126b1013e2888ed0069f40 100644
|
| --- a/runtime/bin/eventhandler_win.cc
|
| +++ b/runtime/bin/eventhandler_win.cc
|
| @@ -145,13 +145,13 @@ bool Handle::CreateCompletionPort(HANDLE completion_port) {
|
|
|
|
|
| void Handle::Close() {
|
| + MonitorLocker ml(monitor_);
|
| if (!SupportsOverlappedIO()) {
|
| // If the handle uses synchronous I/O (e.g. stdin), cancel any pending
|
| // operation before closing the handle, so the read thread is not blocked.
|
| BOOL result = CancelIoEx(handle_, NULL);
|
| ASSERT(result || (GetLastError() == ERROR_NOT_FOUND));
|
| }
|
| - MonitorLocker ml(monitor_);
|
| if (!IsClosing()) {
|
| // Close the socket and set the closing state. This close method can be
|
| // called again if this socket has pending IO operations in flight.
|
|
|