diff --git a/src/java.base/unix/classes/sun/nio/ch/SourceChannelImpl.java b/src/java.base/unix/classes/sun/nio/ch/SourceChannelImpl.java index 99e934e3436..9419ce7bf68 100644 --- a/src/java.base/unix/classes/sun/nio/ch/SourceChannelImpl.java +++ b/src/java.base/unix/classes/sun/nio/ch/SourceChannelImpl.java @@ -23,6 +23,11 @@ * questions. */ +/* + * =========================================================================== + * (c) Copyright IBM Corp. 2022, 2022 All Rights Reserved + * =========================================================================== + */ package sun.nio.ch; import java.io.FileDescriptor; @@ -107,8 +112,8 @@ protected void implCloseSelectableChannel() throws IOException { assert state == ST_CLOSING; long th = thread; if (th != 0) { - nd.preClose(fd); NativeThread.signal(th); + nd.preClose(fd); // wait for read operation to end while (thread != 0) {