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
93d2e86ed0
commit
1525edfde7
@ -184,9 +184,6 @@ public class OioSctpChannel extends AbstractOioMessageChannel
|
||||
return readMessages;
|
||||
}
|
||||
|
||||
Set<SelectionKey> reableKeys = readSelector.selectedKeys();
|
||||
try {
|
||||
for (SelectionKey ignored : reableKeys) {
|
||||
RecvByteBufAllocator.Handle allocHandle = this.allocHandle;
|
||||
if (allocHandle == null) {
|
||||
this.allocHandle = allocHandle = config().getRecvByteBufAllocator().newHandle();
|
||||
@ -214,10 +211,6 @@ public class OioSctpChannel extends AbstractOioMessageChannel
|
||||
buffer.release();
|
||||
}
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
reableKeys.clear();
|
||||
}
|
||||
return readMessages;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user