Skip to content

Commit

Permalink
this is jank but ignore failed handle closes
Browse files Browse the repository at this point in the history
  • Loading branch information
bobcao3 committed Sep 22, 2023
1 parent edb3c55 commit 301ee58
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,13 +145,13 @@ public static void release(long memory) {
if (!Kernel32.INSTANCE.CloseHandle(new WinNT.HANDLE(new Pointer(tracked.desc.handle)))) {
int error = Kernel32.INSTANCE.GetLastError();
System.err.println("STATE MIGHT BE BROKEN! Failed to close handle: " + error);
throw new IllegalStateException();
// throw new IllegalStateException();
}
} else {
int code = 0;
if ((code = LibC.INSTANCE.close((int) tracked.desc.handle)) != 0) {
System.err.println("STATE MIGHT BE BROKEN! Failed to close FD: " + code);
throw new IllegalStateException();
// throw new IllegalStateException();
}
}
MEMORY_TO_HANDLES.remove(memory);
Expand Down

0 comments on commit 301ee58

Please sign in to comment.