Make DatagramChannel impls .isActive() return true when the underlying Channel is open. This also fixes [#1830]

This commit is contained in:
Norman Maurer 2013-09-11 20:37:21 +02:00
parent 98633e0aee
commit 50106f3d41
2 changed files with 2 additions and 2 deletions

View File

@ -128,7 +128,7 @@ public final class NioDatagramChannel
@Override @Override
public boolean isActive() { public boolean isActive() {
DatagramChannel ch = javaChannel(); DatagramChannel ch = javaChannel();
return ch.isOpen() && ch.socket().isBound(); return ch.isOpen();
} }
@Override @Override

View File

@ -125,7 +125,7 @@ public class OioDatagramChannel extends AbstractOioMessageChannel
@Override @Override
public boolean isActive() { public boolean isActive() {
return isOpen() && socket.isBound(); return isOpen();
} }
@Override @Override