[#1770] Fix NPE which was thrown if connection timeout was disabled and the connect did not finish directly when using NIO
This commit is contained in:
parent
6a2f340ec0
commit
9fd35d09a2
@ -240,7 +240,11 @@ public abstract class AbstractNioChannel extends AbstractChannel {
|
||||
connectPromise.setFailure(t);
|
||||
closeIfClosed();
|
||||
} finally {
|
||||
connectTimeoutFuture.cancel(false);
|
||||
// Check for null as the connectTimeoutFuture is only created if a connectTimeoutMillis > 0 is used
|
||||
// See https://github.com/netty/netty/issues/1770
|
||||
if (connectTimeoutFuture != null) {
|
||||
connectTimeoutFuture.cancel(false);
|
||||
}
|
||||
connectPromise = null;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user