Making fix for out of order events by moving registerWebSockets to doStart and not the constructor

This commit is contained in:
Joakim Erdfelt 2012-07-03 11:58:53 -07:00
parent 4549afbcf0
commit 89bd36dbaf
1 changed files with 7 additions and 1 deletions

View File

@ -68,7 +68,6 @@ public abstract class WebSocketHandler extends HandlerWrapper
WebSocketPolicy policy = new WebSocketPolicy(WebSocketBehavior.SERVER);
configurePolicy(policy);
webSocketFactory = new WebSocketServerFactory(policy);
registerWebSockets(webSocketFactory);
}
public void configurePolicy(WebSocketPolicy policy)
@ -76,6 +75,13 @@ public abstract class WebSocketHandler extends HandlerWrapper
/* leave at default */
}
@Override
protected void doStart() throws Exception
{
super.doStart();
registerWebSockets(webSocketFactory);
}
public WebSocketServerFactory getWebSocketFactory()
{
return webSocketFactory;