diff --git a/.travis.yml b/.travis.yml index add558f4..d88ff59b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,7 +18,7 @@ services: env: global: - - VERSION=0.28.2 + - VERSION=0.28.3 - DB_HOST=localhost - DB_USER=travis - DB_PASS= diff --git a/Dockerfile b/Dockerfile index be4fac50..dbbfc7ae 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM alpine:latest -ENV VERSION=v0.28.2 +ENV VERSION=v0.28.3 RUN apk --no-cache add libstdc++ ca-certificates RUN wget -q https://github.com/hunterlong/statup/releases/download/$VERSION/statup-linux-alpine.tar.gz && \ diff --git a/core/checker.go b/core/checker.go index 2ec46931..24b04782 100644 --- a/core/checker.go +++ b/core/checker.go @@ -39,6 +39,10 @@ func (s *Service) Check() *Service { Timeout: 30 * time.Second, } response, err := client.Get(s.Domain) + if err != nil { + s.Failure(fmt.Sprintf("HTTP Error %v", err)) + return s + } response.Header.Set("User-Agent", "StatupMonitor") t2 := time.Now() s.Latency = t2.Sub(t1).Seconds()