HttpProxyServer server = DefaultHttpProxyServer.bootstrap()
.withAddress(localAddressOnPortZero)
.withChainProxyManager(myChainedProxyManager)
...
All is fine until I stop the proxy (with either stop or abort) and create it again on the same address with port 0: it hangs in a registration promise, as by the following stack trace:
Thread [myWorker-2] (Suspended)
owns: Object (id=212)
waiting for: AbstractBootstrap$PendingRegistrationPromise (id=403)
Object.wait(long) line: not available [native method]
AbstractBootstrap$PendingRegistrationPromise(Object).wait() line: 502
AbstractBootstrap$PendingRegistrationPromise(DefaultPromise<V>).awaitUninterruptibly() line: 287
AbstractBootstrap$PendingRegistrationPromise(DefaultChannelPromise).awaitUninterruptibly() line: 135
AbstractBootstrap$PendingRegistrationPromise(DefaultChannelPromise).awaitUninterruptibly() line: 28
DefaultHttpProxyServer.doStart() line: 515
DefaultHttpProxyServer.start() line: 463
DefaultHttpProxyServer.access$700(DefaultHttpProxyServer) line: 70
DefaultHttpProxyServer$DefaultHttpProxyServerBootstrap.start() line: 800
MyClass.ensureProxy() line: 561
...