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

cmd/systray: handle reconnects to IPN bus #13386

Merged
merged 1 commit into from
Sep 5, 2024
Merged

Conversation

awly
Copy link
Contributor

@awly awly commented Sep 5, 2024

When tailscaled restarts and our watch connection goes down, we get stuck in an infinite loop printing ipnbus error: EOF (which ended up consuming all the disk space on my laptop via the log file). Instead, handle errors in watchIPNBus and reconnect after a short delay.

Updates #1708

@awly awly requested a review from willnorris September 5, 2024 16:39
@awly awly force-pushed the awly/systray-handle-reconnect branch from d17796e to 2690e33 Compare September 5, 2024 16:40
}
}

func watchIPNBusOnce(ctx context.Context) error {
Copy link
Member

Choose a reason for hiding this comment

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

nit: I'm not sure of a better name, but this makes it sounds like a sync.Once that is really only ever executed once. It's unexported, so not really THAT big of a deal, but just a tad confusing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

that's fair, renamed to watchIPNBusInner 🤷

When tailscaled restarts and our watch connection goes down, we get
stuck in an infinite loop printing `ipnbus error: EOF` (which ended up
consuming all the disk space on my laptop via the log file). Instead,
handle errors in `watchIPNBus` and reconnect after a short delay.

Updates #1708

Signed-off-by: Andrew Lytvynov <awly@tailscale.com>
@awly awly force-pushed the awly/systray-handle-reconnect branch from 2690e33 to ab0973b Compare September 5, 2024 16:44
@awly awly merged commit e7a6e79 into main Sep 5, 2024
48 checks passed
@awly awly deleted the awly/systray-handle-reconnect branch September 5, 2024 17:11
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