Only schedule another read if the FD is still open (#10551)
Motivation: We should only keep on reading if the fd is still open, otherwise we will produce a confusing exception Modifications: check if fd is still open before schedule the read. Result: Dont produce a confusing excepion when the fd was closed during a read loop.
This commit is contained in:
parent
8ef5dbc24b
commit
044ec159b9
@ -520,7 +520,8 @@ abstract class AbstractIOUringChannel extends AbstractChannel implements UnixCha
|
||||
}
|
||||
|
||||
protected final void scheduleRead() {
|
||||
if (delayedClose == null) {
|
||||
// Only schedule another read if the fd is still open.
|
||||
if (delayedClose == null && fd().isOpen()) {
|
||||
ioState |= READ_SCHEDULED;
|
||||
scheduleRead0();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user