New client has no default timeout and may hang on slow network
Abierto
- Lenguaje dominante
- Go
- Estrellas
- 45
- Forks
- 19
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
The New constructor currently returns an http.Client with Timeout=0, which means requests can wait indefinitely on network stalls.
Reproduction command:
sandbox-exec -f /tmp/no-network4.sb env GO111MODULE=off go test -run TestNewClientSetsTimeout -count=1 ./...
Observed output before fix:
- FAIL: expected positive timeout, got 0s
Expected behavior:
- New clients should set a bounded default timeout so requests fail predictably under network issues.
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Evaluación
Este issue todavía no se ha evaluado.