Skip to content

Commit

Permalink
Silence network timeout errors when checking for updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchell-as committed Oct 26, 2023
1 parent 4f2adc4 commit fd3bb8e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/updater/checker.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package updater

import (
"encoding/json"
"net"
"net/url"
"os"
"runtime"
Expand Down Expand Up @@ -115,6 +116,10 @@ func (u *Checker) getUpdateInfo(desiredChannel, desiredVersion string) (*Availab
label = anaConst.UpdateLabelFailed
msg = anaConst.UpdateErrorFetch
err = errs.Wrap(err, "Could not fetch update info from %s", infoURL)
if e, ok := err.(net.Error); ok && e.Timeout() {
logging.Debug("Silencing network timeout error: %v", err)
err = errs.Silence(err)
}
}

u.an.EventWithLabel(
Expand Down

0 comments on commit fd3bb8e

Please sign in to comment.