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

Fix auto-update panic #551

Merged
merged 2 commits into from Aug 2, 2022
Merged

Fix auto-update panic #551

merged 2 commits into from Aug 2, 2022

Conversation

canercidam
Copy link
Contributor

No description provided.

@@ -215,7 +229,6 @@ func (updater *UpdaterService) compareScannerNodeVersion(previousRef string) (ne

func (updater *UpdaterService) checkNewerReleaseAndWait(previousRef string, delay time.Duration) (foundNew bool) {
detectedCh := make(chan struct{})
defer close(detectedCh)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was causing a closed channel send panic. Removing it as the channel is deallocated anyways.

@@ -115,7 +115,7 @@ func (updater *UpdaterService) Start() error {
updater.stopServer()
return
case <-t.C:
err := updater.updateLatestReleaseWithDelay(updater.updateCheckInterval)
err := updater.updateLatestReleaseWithDelay(updater.updateDelay)
Copy link
Contributor Author

@canercidam canercidam Aug 1, 2022

Choose a reason for hiding this comment

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

This caused referencing a wrong delay duration.

@canercidam canercidam merged commit 79000a6 into master Aug 2, 2022
@canercidam canercidam deleted the make-auto-update-more-robust branch August 2, 2022 08:14
Copy link

@Millerteam Millerteam left a comment

Choose a reason for hiding this comment

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

services/updater/updater.go

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.

None yet

4 participants