Skip to content

Commit

Permalink
fix panic issue
Browse files Browse the repository at this point in the history
  • Loading branch information
mrpalide committed Nov 23, 2023
1 parent efebdfd commit 9c155fe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 0 additions & 2 deletions cmd/skywire-cli/commands/ut/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,6 @@ func dmsgHTTPQuery(cmd *cobra.Command) ([]byte, error) {

dmsgHTTP := http.Client{Transport: dmsghttp.MakeHTTPTransport(cmd.Context(), dmsgDC)}

dmsgHTTP.Timeout = time.Second * 15

resp, err := dmsgHTTP.Get(utDmsgAddr + "/uptimes?v=v2")
if err != nil {
return []byte{}, err
Expand Down
4 changes: 3 additions & 1 deletion pkg/visor/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,9 @@ func (v *Visor) FetchUptimeTrackerData(pk string) ([]byte, error) {
return body, fmt.Errorf("Invalid or missing public key")
}
}

if v.uptimeTracker == nil {
return body, fmt.Errorf("Uptime tracker module not available")
}
return v.uptimeTracker.FetchUptimes(context.TODO(), pk)
}

Expand Down

0 comments on commit 9c155fe

Please sign in to comment.