aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--worker.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/worker.go b/worker.go
index 007bc52..bccfe74 100644
--- a/worker.go
+++ b/worker.go
@@ -65,7 +65,7 @@ func newWorker(cfg ServerConfig) (wrk *worker, err error) {
switch notifConfig.Kind {
case notifKindMattermost:
wrk.httpc = &http.Client{
- Timeout: 5 * time.Second,
+ Timeout: 10 * time.Second,
}
}
}
@@ -226,6 +226,7 @@ func (wrk *worker) pushNotifMattermost(
resp, err = wrk.httpc.Do(req)
if err != nil {
log.Printf(`%s: %s`, logp, err)
+ return
}
if resp.StatusCode == 200 {
@@ -236,6 +237,7 @@ func (wrk *worker) pushNotifMattermost(
body, err = io.ReadAll(resp.Body)
if err != nil {
log.Printf(`%s: %s`, logp, err)
+ return
}
log.Printf(`%s: fail with status code %d: %s`, logp, resp.StatusCode, body)