Fixed an infinite loop on a certain NIO impl
This commit is contained in:
parent
77f79c3ea6
commit
370160d0a5
@ -388,6 +388,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));
|
||||
}
|
||||
}
|
||||
|
@ -422,6 +422,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;
|
||||
}
|
||||
|
@ -352,6 +352,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