OioSctpChannel iterating over selected keys
Motivation: OioSctpChannel.doReadMessages is iterating over the selected keys, and ignoring each selected key. It is not known why this is needed and no other channel implementation does this. Modifications: - Stop iterating over selected keys, and just read like other channels Result: No unnecessary iteration in OioSctpChannel.doReadMessages. Fixes https://github.com/netty/netty/issues/3884
This commit is contained in:
parent
5498fd12dc
commit
56cc0bbd4c
@ -183,9 +183,6 @@ public class OioSctpChannel extends AbstractOioMessageChannel
|
||||
return readMessages;
|
||||
}
|
||||
|
||||
Set<SelectionKey> reableKeys = readSelector.selectedKeys();
|
||||
try {
|
||||
for (@SuppressWarnings("unused") SelectionKey ignored : reableKeys) {
|
||||
final RecvByteBufAllocator.Handle allocHandle = unsafe().recvBufAllocHandle();
|
||||
ByteBuf buffer = allocHandle.allocate(config().getAllocator());
|
||||
boolean free = true;
|
||||
@ -210,10 +207,6 @@ public class OioSctpChannel extends AbstractOioMessageChannel
|
||||
buffer.release();
|
||||
}
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
reableKeys.clear();
|
||||
}
|
||||
return readMessages;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user