aboutsummaryrefslogtreecommitdiff
path: root/cmd/main/http.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/main/http.go')
-rw-r--r--cmd/main/http.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd/main/http.go b/cmd/main/http.go
index 94d6ae5..fd6169e 100644
--- a/cmd/main/http.go
+++ b/cmd/main/http.go
@@ -12,9 +12,9 @@ type httpCheck struct {
Code int
}
-func httpStatusWorker(jobs <-chan httpCheck, msg chan<- *jobResponse) {
+func httpStatusWorker(jobs <-chan httpCheck, msg chan<- *jobResponse, timeout int) {
for hc := range jobs {
- err := checkup.HttpStatusOK(hc.URL, hc.Code)
+ err := checkup.HttpStatusOK(hc.URL, timeout, hc.Code)
if err != nil {
s := fmt.Sprintf("Checking: %s, %v",
hc.URL, err)
@@ -36,7 +36,7 @@ func checkStatus(conf *Config) map[string]*jobResponse {
msgs := make(chan *jobResponse)
for i := 1; i <= conf.Workers; i++ {
- go httpStatusWorker(hc, msgs)
+ go httpStatusWorker(hc, msgs, conf.HTTPTimeout)
}
go func() {