From cab2a0376067600f4e5e7598a799c28fcc346d33 Mon Sep 17 00:00:00 2001 From: William Kemper Date: Thu, 16 Jan 2014 14:59:29 -0800 Subject: [PATCH] fix grouping for isActive - socket.isBound is almost always true and should not override 'isOpen' --- .../java/io/netty/channel/socket/oio/OioDatagramChannel.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/transport/src/main/java/io/netty/channel/socket/oio/OioDatagramChannel.java b/transport/src/main/java/io/netty/channel/socket/oio/OioDatagramChannel.java index f660cea330..ab789de457 100644 --- a/transport/src/main/java/io/netty/channel/socket/oio/OioDatagramChannel.java +++ b/transport/src/main/java/io/netty/channel/socket/oio/OioDatagramChannel.java @@ -126,8 +126,9 @@ public final class OioDatagramChannel extends AbstractOioMessageChannel implemen @Override public boolean isActive() { - return isOpen() && (config.getOption(ChannelOption.DATAGRAM_CHANNEL_ACTIVE_ON_REGISTRATION) && isRegistered()) - || socket.isBound(); + return isOpen() + && ((config.getOption(ChannelOption.DATAGRAM_CHANNEL_ACTIVE_ON_REGISTRATION) && isRegistered()) + || socket.isBound()); } @Override