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

Fix keep alive heartbeat not being initialized correctly #553

Closed
wants to merge 4 commits into from

Conversation

alitas
Copy link

@alitas alitas commented Nov 15, 2022

The current implementation tries to start the heartbeat before auth response is received, which causes either a null pointer exception or a 401 response depending on the timing of the network. Furthermore, because of the singleton pattern, the heartbeat thread never stops, using system resources unnecessarily.

Instead of using token validity in seconds, this PR uses CLIENT_SESSION_KEEP_ALIVE_HEARTBEAT_FREQUENCY, which is returned by the server upon setting CLIENT_SESSION_KEEP_ALIVE true. It also allows overriding this parameter.

@github-actions
Copy link

github-actions bot commented Nov 15, 2022

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@alitas
Copy link
Author

alitas commented Nov 15, 2022

I have read the CLA Document and I hereby sign the CLA

@alitas alitas closed this Feb 23, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Feb 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant