Increase timeout to 3 seconds
The status bot keeps spamming Matrix with bogus messages about people's personal websites being down because they're hosted on other servers and sometimes take longer than 1 second to fetch. 3 seconds should be enough to avoid this.
This commit is contained in:
parent
6f551cd1d9
commit
8f83a8cae7
1 changed files with 1 additions and 1 deletions
2
main.go
2
main.go
|
@ -60,7 +60,7 @@ func index(w http.ResponseWriter, r *http.Request) {
|
|||
}
|
||||
|
||||
// get service status'
|
||||
timeout := time.Second
|
||||
timeout := 3 * time.Second
|
||||
ctx, cancel := context.WithTimeout(context.Background(), timeout)
|
||||
defer cancel()
|
||||
data := scanner.CheckServiceBatch(ctx, config.Service)
|
||||
|
|
Loading…
Reference in a new issue