Make DatagramChannel impls .isActive() return true when the underlying Channel is open. This also fixes [#1830]
This commit is contained in:
parent
98633e0aee
commit
50106f3d41
@ -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
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user