diff options
author | Jordan <me@jordan.im> | 2021-12-13 22:43:20 -0700 |
---|---|---|
committer | Jordan <me@jordan.im> | 2021-12-13 22:43:20 -0700 |
commit | a3281e1b5cda3466c83ebba65a0d6e59a25dc105 (patch) | |
tree | 09c9bb40e8cdc11a0f85272b32d550ec0d1bc88b | |
parent | 1cfdfd841155ccca925262a040dd879e6e98b89b (diff) | |
download | keep-a3281e1b5cda3466c83ebba65a0d6e59a25dc105.tar.gz keep-a3281e1b5cda3466c83ebba65a0d6e59a25dc105.zip |
archive: do not log save endpoint timeouts (harmless)
-rw-r--r-- | archive.go | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -3,6 +3,7 @@ package main import ( "encoding/json" "log" + "net" "net/http" "regexp" "strconv" @@ -64,7 +65,9 @@ func archive(url string) int { req, err := http.NewRequest("GET", API_SAVE+url, nil) resp, err := client.Do(req) if err != nil { - log.Println(err) + if e, _ := err.(net.Error); !e.Timeout() { + log.Println(err) + } return 0 } return resp.StatusCode |