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

Remote control #249

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

Remote control #249

wants to merge 10 commits into from

Conversation

blinktag
Copy link
Member

@blinktag blinktag commented Mar 7, 2022

No description provided.

@blinktag blinktag requested a review from dselans March 7, 2022 16:35
Copy link
Contributor

@dselans dselans left a comment

Choose a reason for hiding this comment

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

Minor comments.

@@ -74,6 +82,8 @@ func (p *Plumber) RunServer() error {
p.log.Error(errors.Wrap(err, "failed to relaunch tunnels"))
}

go p.runRemoteControl()
Copy link
Contributor

Choose a reason for hiding this comment

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

Should remote control be elective? It can be enabled by default but should be possible to disable.

@@ -89,6 +99,119 @@ func (p *Plumber) RunServer() error {
return nil
}

func (p *Plumber) runRemoteControl() bool {
if !p.CLIOptions.Server.RemoteControlEnabled {
Copy link
Contributor

Choose a reason for hiding this comment

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

Ah I see, it's a noop.

plumber/cli_server.go Outdated Show resolved Hide resolved
// Reconnected successfully, exit out of this goroutine
// Another one will be started for the new connection in runRemoteControl()
return
}
Copy link
Contributor

Choose a reason for hiding this comment

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

What happens when all reconnects (with backoff) fail?

Copy link
Member Author

Choose a reason for hiding this comment

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

@dselans It will continue to retry with the highest interval, in this case, every 5 minutes. Since this will be running in server mode, I think we just want it to retry indefinitely right?

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.

2 participants