-
Notifications
You must be signed in to change notification settings - Fork 103
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
adds control server acceleartion on menu open event, adds more failsafes for shutting down desktop when parent gone #1159
adds control server acceleartion on menu open event, adds more failsafes for shutting down desktop when parent gone #1159
Conversation
…fes for shutting down desktop when parent gone
ee/desktop/runner/server/server.go
Outdated
r.Body.Close() | ||
} | ||
|
||
ms.knapsack.SetControlRequestIntervalOverride(5*time.Second, 1*time.Minute) |
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.
hooray for Knaspsack
, it made this part so easy
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.
Just a couple small comments, LGTM overall!
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.
🔥
controlRequestAcclerationDuration = 1 * time.Minute | ||
) | ||
|
||
type controlRequestIntervalOverrider interface { |
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.
Yay, cool to see the knapsack sub-interface in action. This feels clean too
} | ||
|
||
func New(logger log.Logger, controlRequestIntervalOverrider controlRequestIntervalOverrider) (*RunnerServer, error) { | ||
listener, err := net.Listen("tcp", "localhost:0") |
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.
Does using port zero mean it will choose a dynamically generated unused port?
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.
yea, it just picks a random port, it's what the current "monitor server" that is doing now on stable
This PR repurposes the "monitor_server" that was used only for the desktop user process to check on the root processes' health. The new runner server has an additional endpoint for "menuopened" that the desktop user process can call when it gets a notification from systray that the menu has been opened.
It introduces RunnerServer and renames DesktopServer to UserServer. Both servers are related to the desktop but one is run by the DesktopRunner and one is run by the Desktop User Process.
After this PR merges, I will do some reshuffling of the desktop package structure and put packages into either a
user
orrunner
folder based on their role.It also:
closes: #1155
closes: #1141