-
-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Labels
enhancementNew feature or requestNew feature or request
Description
I got a service down as the url can be dialed correctly but http status code as 404
and got a 404 page not found
from traefik.
The current code seems to take this as service up. Should we also check HTTP status code?
miniboard/internal/check/state.go
Lines 12 to 27 in 59861cd
func State(host models.Host) bool { | |
if host.Port == "" { | |
host.Port = "80" | |
} | |
timeout := 3 * time.Second | |
target := host.Addr + ":" + host.Port | |
conn, err := net.DialTimeout("tcp", target, timeout) | |
if err != nil { | |
return false | |
} | |
conn.Close() | |
return true | |
} |
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request