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

Add reconnection to local server if the connection is lost #6

Merged
merged 3 commits into from
May 9, 2024

Conversation

9df906f6
Copy link
Collaborator

If a local server tends to close connections for some reason (e.g. inactivity timeout), tunneling client shuts down a tunnel event if a local server is operational.
The fix allows the client to try to reconnect to local server a few times if the connection is lost.

@@ -52,6 +52,9 @@ const { argv } = yargs
.option('request-secure-tunnel', {
describe: 'Requests tunel server to create secure tunnel if it is available.',
})
.option('local_max_reconnect_count', {
describe: 'Max number of reconnection retries to local server if it goes offline.',
Copy link

Choose a reason for hiding this comment

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

can you add default here please

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

remote.end();

if(self.localReconnectionRetryCount < localReconnectionMaxRetryCount)
{
Copy link

Choose a reason for hiding this comment

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

please keep styles consistent

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

My bad, fixed.

@9df906f6 9df906f6 requested a review from b1ff May 2, 2024 13:55
@9df906f6 9df906f6 merged commit da6c228 into master May 9, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants