diff options
Diffstat (limited to 'libjava/gnu/java/nio/SocketChannelSelectionKey.java')
-rw-r--r-- | libjava/gnu/java/nio/SocketChannelSelectionKey.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libjava/gnu/java/nio/SocketChannelSelectionKey.java b/libjava/gnu/java/nio/SocketChannelSelectionKey.java index 13affef2474..75b4dfd87e5 100644 --- a/libjava/gnu/java/nio/SocketChannelSelectionKey.java +++ b/libjava/gnu/java/nio/SocketChannelSelectionKey.java @@ -51,6 +51,8 @@ public final class SocketChannelSelectionKey public int getNativeFD() { - return ((SocketChannelImpl) ch).getNativeFD(); + NIOSocket socket = + (NIOSocket) ((SocketChannelImpl) ch).socket(); + return socket.getPlainSocketImpl().getNativeFD(); } } |