# read: connection reset by peer

- **ID:** `go/http-client-connection-reset`
- **Domain:** go
- **Category:** network_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

服务器在客户端读取响应前关闭了TCP连接

## Version Compatibility

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

## Workarounds

1. **** (80% success)
   ```
   使用http.Client的Retry机制，检查幂等性后重试
   ```
2. **** (70% success)
   ```
   设置Transport的MaxIdleConnsPerHost
   ```

## Dead Ends

- **** — 可能导致数据不一致或重复提交 (60% fail)
- **** — 不能解决服务器主动关闭连接的问题 (40% fail)
