-
Notifications
You must be signed in to change notification settings - Fork 71
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
base: master
Are you sure you want to change the base?
Remote control #249
Conversation
There was a problem hiding this 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() |
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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.
// Reconnected successfully, exit out of this goroutine | ||
// Another one will be started for the new connection in runRemoteControl() | ||
return | ||
} |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
No description provided.