Websocket timeout causes page refresh
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.8k
- Forks
- 717
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 3
Description
- Vaadin Framework version
Tested on 8.x but probably any
- Browser version:
any
- Description of the bug
some parameter of atmosphere is by default set to servlet sessionTimeout.
Due to heartbeat calls the server session never timeouts. Fine.
But in case of client inactivity, the client side atmosphere thinks it expired and then refreshes the page.
Maybe:
/**
* The default {@link javax.servlet.http.HttpSession#setMaxInactiveInterval(int)}
* <p/>
* Default: -1<br>
* Value: org.atmosphere.cpr.session.maxInactiveInterval
*/
String SESSION_MAX_INACTIVE_INTERVAL = "org.atmosphere.cpr.session.maxInactiveInterval";
But could be due to org.atmosphere.websocket.maxIdleTime.
- Minimal reproducible example
set session timeout to 1min and heartbeat to 30s.
wait >1min ensuring no websocket frame is transfered.
- Expected behavior
no page refresh
- Solution
Ensure atmosphere never detects inactivity to let vaadin work:
to be tested
rg.atmosphere.websocket.maxIdleTime = -1 or org.atmosphere.cpr.session.maxInactiveInterval = -1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked Atmosphere ApplicationConfig.java and reproduce the case with a one-minute session timeout and a 30-second heartbeat, waiting until no WebSocket frame is transferred. Determine whether session.maxInactiveInterval or websocket.maxIdleTime causes the refresh; done means the page does not refresh after client inactivity.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100