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

no_vnc_heartbeat param to enable ws ping/pong #24

Merged
merged 1 commit into from
Apr 29, 2022

Conversation

patlachance
Copy link
Contributor

This PR fixes #23.

@accetto accetto added the enhancement New feature or request label Mar 20, 2022
@accetto accetto self-assigned this Mar 20, 2022
@accetto
Copy link
Owner

accetto commented Mar 20, 2022

Hello @patlachance

I'll merge your PR and my changes from the next_release branch after I'll get your answer about the testing results (see the issue #23).

I really appreciate that you've thought even about the readme file. Thanks.

Regards
accetto

@accetto accetto self-requested a review April 26, 2022 17:20
@accetto accetto changed the base branch from master to next-release April 29, 2022 15:33
@accetto accetto changed the base branch from next-release to master April 29, 2022 15:53
Comment on lines +156 to +157
If your session disconnnects, it might be related to a network equipment (load-balancer, reverse proxy, ...) dropping the websocket session for inactivity (more info [here](https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_read_timeout) and [here](https://nginx.org/en/docs/http/websocket.html) for nginx). In such case, try defining the NO_VNC_HEARTBEAT=<xx environment variable at startup-time, where <xx> is the number of seconds between each [websocket ping/pong](https://github.com/websockets/ws/issues/977) packet.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks.

Comment on lines +97 to +102
if [ -n "${NO_VNC_HEARTBEAT}" ]; then
HEARTBEAT_OPT="--heartbeat ${NO_VNC_HEARTBEAT}"
fi

### noVNC startup (in the background)
"${NO_VNC_HOME}"/utils/novnc_proxy --vnc localhost:${VNC_PORT} --listen ${NO_VNC_PORT} &> "${_novnc_log}" &
"${NO_VNC_HOME}"/utils/novnc_proxy --vnc localhost:${VNC_PORT} --listen ${NO_VNC_PORT} ${HEARTBEAT_OPT} &> "${_novnc_log}" &
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes are OK, but I've added some more stuff in a meantime, so I'll overwrite them later.

@accetto accetto merged commit dcad70f into accetto:master Apr 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inactive NoVNC session disconnected by network appliance
2 participants