Skip to content

Commit 39b8cc3

Browse files
earthlingNorman Maurer
authored andcommitted
fix grouping for isActive - socket.isBound is almost always true and should not override 'isOpen'
1 parent faf8bec commit 39b8cc3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

transport/src/main/java/io/netty/channel/socket/oio/OioDatagramChannel.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,9 @@ public boolean isOpen() {
126126

127127
@Override
128128
public boolean isActive() {
129-
return isOpen() && (config.getOption(ChannelOption.DATAGRAM_CHANNEL_ACTIVE_ON_REGISTRATION) && isRegistered())
130-
|| socket.isBound();
129+
return isOpen()
130+
&& ((config.getOption(ChannelOption.DATAGRAM_CHANNEL_ACTIVE_ON_REGISTRATION) && isRegistered())
131+
|| socket.isBound());
131132
}
132133

133134
@Override

0 commit comments

Comments
 (0)