Skip to content

Commit

Permalink
fix: use configured push parameter (#12700)
Browse files Browse the repository at this point in the history
Get the push suspend timout
parameter from the configuration
as atmosphere doesn't read it
from anywhere.

Fixes #12559
  • Loading branch information
caalador authored and vaadin-bot committed Jan 12, 2022
1 parent 782ef44 commit 7c5bcaa
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,13 @@ public PushRequestHandler(VaadinServletService service)
getLogger().debug("Using pre-initialized Atmosphere for servlet {}",
vaadinServletConfig.getServletName());
}
pushHandler.setLongPollingSuspendTimeout(
atmosphere.getAtmosphereConfig().getInitParameter(
InitParameters.SERVLET_PARAMETER_PUSH_SUSPEND_TIMEOUT_LONGPOLLING,
-1));
String timeout = service.getDeploymentConfiguration().getStringProperty(
InitParameters.SERVLET_PARAMETER_PUSH_SUSPEND_TIMEOUT_LONGPOLLING,
"-1");
atmosphere.addInitParameter(
InitParameters.SERVLET_PARAMETER_PUSH_SUSPEND_TIMEOUT_LONGPOLLING,
timeout);
pushHandler.setLongPollingSuspendTimeout(Integer.parseInt(timeout));
for (AtmosphereHandlerWrapper handlerWrapper : atmosphere
.getAtmosphereHandlers().values()) {
AtmosphereHandler handler = handlerWrapper.atmosphereHandler;
Expand Down

0 comments on commit 7c5bcaa

Please sign in to comment.