Only try to bind if late registration not failed.

Motivation:

We should not try to call bind if registration failed.

Modifications:

Only call doBind0(...) when the registration not failed.

Result:

Not try to to bind if the registration failed.
This commit is contained in:
Norman Maurer 2016-05-12 13:14:52 +02:00
parent c6edc3709e
commit 1836f833d5

View File

@ -295,8 +295,9 @@ public abstract class AbstractBootstrap<B extends AbstractBootstrap<B, C>, C ext
// Registration was successful, so set the correct executor to use.
// See https://github.com/netty/netty/issues/2586
promise.executor = channel.eventLoop();
doBind0(regFuture, channel, localAddress, promise);
}
doBind0(regFuture, channel, localAddress, promise);
}
});
return promise;