diff --git a/src/hotspot/os/windows/attachListener_windows.cpp b/src/hotspot/os/windows/attachListener_windows.cpp index 2dbb0391290..2cc9d192ce5 100644 --- a/src/hotspot/os/windows/attachListener_windows.cpp +++ b/src/hotspot/os/windows/attachListener_windows.cpp @@ -92,6 +92,7 @@ public: void close() { if (opened()) { + ThreadBlockInVM tbivm(JavaThread::current()); FlushFileBuffers(_hPipe); CloseHandle(_hPipe); _hPipe = INVALID_HANDLE_VALUE;