Skip to content

Commit

Permalink
Allow posting when a PoP ping fails
Browse files Browse the repository at this point in the history
Fixes #12
  • Loading branch information
rs committed Jan 2, 2021
1 parent 0fa9fe2 commit 88b099d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,11 @@ func pop(name, ip string) *Ping {
res, err := cl.Do(req)
if err != nil {
fmt.Printf("Fetch error: %v\n", err)
return nil
return &Ping{
Pop: "err: " + err.Error(),
Protocol: 0,
RTT: -1,
}
}
defer res.Body.Close()
var p Ping
Expand Down

0 comments on commit 88b099d

Please sign in to comment.