Remove an unnecessary expression in NioEventLoop (#9729)
Motivation: Remove an unnecessary expression to make the code more readable Modification: Remove `eventLoop == null` Result: Fixes #9725
This commit is contained in:
parent
8d99aa1235
commit
82376fd889
@ -666,11 +666,10 @@ public final class NioEventLoop extends SingleThreadEventLoop {
|
|||||||
// and thus the SelectionKey could be cancelled as part of the deregistration process, but the channel is
|
// and thus the SelectionKey could be cancelled as part of the deregistration process, but the channel is
|
||||||
// still healthy and should not be closed.
|
// still healthy and should not be closed.
|
||||||
// See https://github.com/netty/netty/issues/5125
|
// See https://github.com/netty/netty/issues/5125
|
||||||
if (eventLoop != this || eventLoop == null) {
|
if (eventLoop == this) {
|
||||||
return;
|
|
||||||
}
|
|
||||||
// close the channel if the key is not valid anymore
|
// close the channel if the key is not valid anymore
|
||||||
unsafe.close(unsafe.voidPromise());
|
unsafe.close(unsafe.voidPromise());
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user