# runtime: goroutine leak: net/http.(*persistConn).readLoop stuck

- **ID:** `go/goroutine-leak-http-body`
- **Domain:** go
- **Category:** resource_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

HTTP response bodies are not closed, causing persistent connection goroutines to remain blocked reading.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 1.18 | active | — | — |
| 1.22 | active | — | — |

## Workarounds

1. **** (95% success)
   ```
   resp, err := client.Do(req)
if err != nil { return err }
defer resp.Body.Close()
io.Copy(io.Discard, resp.Body)
   ```
2. **** (88% success)
   ```
   ctx, cancel := context.WithTimeout(ctx, 5*time.Second)
defer cancel()
req = req.WithContext(ctx)
   ```

## Dead Ends

- **** — Timeout does not close the body; the readLoop goroutine still leaks. (75% fail)
- **** — Reusing the client does not fix unclosed bodies. (80% fail)
