mirror of https://github.com/apache/druid.git
Merge pull request #2689 from metamx/fix-broadcast-lockup
fix servlet startup sequence, fixes #2681
This commit is contained in:
commit
527b728f3e
|
@ -120,6 +120,8 @@ public class AsyncQueryForwardingServlet extends AsyncProxyServlet
|
||||||
@Override
|
@Override
|
||||||
public void init() throws ServletException
|
public void init() throws ServletException
|
||||||
{
|
{
|
||||||
|
super.init();
|
||||||
|
|
||||||
// separate client with more aggressive connection timeouts
|
// separate client with more aggressive connection timeouts
|
||||||
// to prevent cancellations requests from blocking queries
|
// to prevent cancellations requests from blocking queries
|
||||||
broadcastClient = httpClientProvider.get();
|
broadcastClient = httpClientProvider.get();
|
||||||
|
@ -131,7 +133,17 @@ public class AsyncQueryForwardingServlet extends AsyncProxyServlet
|
||||||
} catch(Exception e) {
|
} catch(Exception e) {
|
||||||
throw new ServletException(e);
|
throw new ServletException(e);
|
||||||
}
|
}
|
||||||
super.init();
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void destroy()
|
||||||
|
{
|
||||||
|
super.destroy();
|
||||||
|
try {
|
||||||
|
broadcastClient.stop();
|
||||||
|
} catch(Exception e) {
|
||||||
|
log.warn(e, "Error stopping servlet");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue