Fixed an infinite loop on a certain NIO impl
This commit is contained in:
parent
6707aa751c
commit
f3899e8d58
@ -391,6 +391,7 @@ class NioClientSocketPipelineSink extends AbstractChannelSink {
|
||||
} catch (Throwable t) {
|
||||
ch.connectFuture.setFailure(t);
|
||||
fireExceptionCaught(ch, t);
|
||||
k.cancel(); // Some JDK implementations run into an infinite loop without this.
|
||||
ch.worker.close(ch, succeededFuture(ch));
|
||||
}
|
||||
}
|
||||
|
@ -424,6 +424,7 @@ class NioDatagramWorker implements Runnable {
|
||||
}
|
||||
|
||||
if (failure) {
|
||||
key.cancel(); // Some JDK implementations run into an infinite loop without this.
|
||||
close(channel, succeededFuture(channel));
|
||||
return false;
|
||||
}
|
||||
|
@ -353,6 +353,7 @@ class NioWorker implements Runnable {
|
||||
}
|
||||
|
||||
if (ret < 0 || failure) {
|
||||
k.cancel(); // Some JDK implementations run into an infinite loop without this.
|
||||
close(channel, succeededFuture(channel));
|
||||
return false;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user