Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting org.atmosphere.websocket.maxIdleTime property closes the websocket connection as soon as it is opened. #1026

Closed
jbhavaraju opened this issue Apr 17, 2013 · 3 comments
Labels

Comments

@jbhavaraju
Copy link

We are using atmosphere version 1.1.0.RC1 for websockets over Tomcat and it looks like the TomcatWebsocketHandler is not handling the maxIdleTime property correctly.

From org.atmosphere.container.TomcatWebsocketHandler,

String s = framework.getAtmosphereConfig().getInitParameter(ApplicationConfig.WEBSOCKET_IDLETIME);
if (s != null) {
webSocketWriteTimeout = Integer.valueOf(1);
} else {
webSocketWriteTimeout = -1;
}

It looks like the timeout value is getting overwritten to 1 millisecond if the property is set at all. The end effect is that the connection gets dropped as soon as it is established

jfarcand added a commit that referenced this issue Apr 17, 2013
jfarcand added a commit that referenced this issue Apr 17, 2013
@jfarcand
Copy link
Member

Good finding. Fixed in both version.

@jbhavaraju
Copy link
Author

Hey, Thanks for fixing it so promptly. But I'm confused, maven central has 1.1.0.RC1, and I don't see a tag here in git for RC1. I see you applied the fix to 1.0.x so, does that mean I have to merge your fix into RC1 ?

thanks !

j

@jfarcand
Copy link
Member

The main branch is master, e.g 1.1.0-SNAPSHOT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants