Skip to content
This repository has been archived by the owner on May 23, 2022. It is now read-only.

Fix TLS reconnect #22

Merged
merged 1 commit into from
Oct 31, 2021
Merged

Fix TLS reconnect #22

merged 1 commit into from
Oct 31, 2021

Conversation

andrei-markeev
Copy link
Contributor

Instead of just calling socket.connect, it seems the best way is to recreate the socket from scratch.
I also added a simple exponential backoff (up to 15 seconds) when trying to reconnect.

Note: Using socket.destroy + socket.unref is essential to prevent memory leaks.

Fixes #21

@pikadun pikadun merged commit 2b9a5d1 into camarojs:main Oct 31, 2021
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

client doesn't reconnect to SSL
2 participants