Skip to content

Commit

Permalink
Fixes #2078
Browse files Browse the repository at this point in the history
  • Loading branch information
jfarcand committed Oct 28, 2015
1 parent af0f86e commit 8ec6a57
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,22 @@
protected static final Action timedoutAction = new Action(Action.TYPE.TIMEOUT);
protected static final Action cancelledAction = new Action(Action.TYPE.CANCELLED);
protected final AtmosphereConfig config;
private final EndpointMapper<AtmosphereHandlerWrapper> mapper;
private EndpointMapper<AtmosphereHandlerWrapper> mapper;
private final long closingTime;
private final boolean isServlet30;
private boolean closeOnCancel = false;

public AsynchronousProcessor(AtmosphereConfig config) {
this.config = config;
mapper = config.framework().endPointMapper();
closingTime = Long.valueOf(config.getInitParameter(ApplicationConfig.CLOSED_ATMOSPHERE_THINK_TIME, "0"));
isServlet30 = Servlet30CometSupport.class.isAssignableFrom(this.getClass());
closeOnCancel = config.getInitParameter(ApplicationConfig.CLOSE_STREAM_ON_CANCEL, false);
config.startupHook(new AtmosphereConfig.StartupHook() {
@Override
public void started(AtmosphereFramework framework) {
mapper = framework.endPointMapper();
}
});
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,8 @@ public void apply(final AtmosphereFramework fwk, final Class c) throws Exception
fwk.webSocketFactory(fwk.newClassInstance(WebSocketFactory.class, c));
} else if (AtmosphereFramework.class.isAssignableFrom(c)) {
// No OPS
} else if (EndpointMapper.class.isAssignableFrom(c)) {
fwk.endPointMapper(fwk.newClassInstance(EndpointMapper.class, c));
} else {
logger.warn("{} is not a framework service that could be installed", c.getName());
}
Expand Down

0 comments on commit 8ec6a57

Please sign in to comment.