> ## Content Index
> Fetch the complete content index at: https://logbuch-changelog.nichedthemes.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# Go’s http.Client waits forever by default
- URL: https://logbuch-changelog.nichedthemes.com/gos-http-client-waits-forever-by-default/
- Published: 2026-10-14T14:40:00.000Z
- Updated: 2026-10-14T14:40:00.000Z
- Author: Hanne Voss
- Tags: Pegel, Go, #til, #Import 2026-11-19 07:37

An `http.Client` without `Timeout` never gives up on a server that accepts the connection and then sends nothing. The probe hung on exactly that for 40 minutes during testing.

```go
client := &http.Client{Timeout: 10 * time.Second}
```

`Timeout` covers the whole request, from dialling to the last byte of the body. For a check, that is the number we want.