[#1503]Fix a bug which incorrectly canceled keys for DatagramPackets when the epoll workaround was used
This commit is contained in:
parent
5aeb836d8e
commit
0cfbb7d54b
@ -213,7 +213,7 @@ abstract class AbstractNioSelector implements NioSelector {
|
||||
for (SelectionKey key: selector.keys()) {
|
||||
SelectableChannel ch = key.channel();
|
||||
try {
|
||||
if (ch instanceof DatagramChannel && !((DatagramChannel) ch).isConnected() ||
|
||||
if (ch instanceof DatagramChannel && !ch.isOpen() ||
|
||||
ch instanceof SocketChannel && !((SocketChannel) ch).isConnected()) {
|
||||
notConnected = true;
|
||||
// cancel the key just to be on the safe side
|
||||
|
Loading…
Reference in New Issue
Block a user