summaryrefslogtreecommitdiff
path: root/gnu/java/nio/SocketChannelSelectionKey.java
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/java/nio/SocketChannelSelectionKey.java')
-rw-r--r--gnu/java/nio/SocketChannelSelectionKey.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/gnu/java/nio/SocketChannelSelectionKey.java b/gnu/java/nio/SocketChannelSelectionKey.java
index dcbc7bd37..a6a635dd4 100644
--- a/gnu/java/nio/SocketChannelSelectionKey.java
+++ b/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();
}
}