DefaultHttpProxyServer.start() hangs after stop

45 views
Skip to first unread message

Cristian Ghezzi

unread,
Jun 29, 2016, 9:01:08 AM6/29/16
to LittleProxy
In my code I start a DefaultHttpProxyServer with something like:

void ensureProxy() {
HttpProxyServer server = DefaultHttpProxyServer.bootstrap()
.withAddress(localAddressOnPortZero)
.withChainProxyManager(myChainedProxyManager)
.withFiltersSource(...)
.start();
...
}

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
...

Any suggestion on what to do to investigate the matter?

littleproxy-1.1.0
netty-all-4.0.36-Final
Java 7






Reply all
Reply to author
Forward
0 new messages