Skip to content

Commit

Permalink
Make network speed test a bit more robust
Browse files Browse the repository at this point in the history
  • Loading branch information
rubiojr committed Feb 2, 2020
1 parent 083bf0d commit 7ce9dcc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ func pingTime(url string) string {
time_start := time.Now()
resp, err := http.Get(url)
if err != nil {
panic(err)
log.Printf("Error testing network speed: %v", err)
return "🔴"
}
defer resp.Body.Close()

Expand Down

0 comments on commit 7ce9dcc

Please sign in to comment.