BeyondDimension / BeyondDimension/SteamTools
GitHub API 请求间歇性 502 + SocketException(10054) 远程强制关闭连接(长请求 ~19s 后断连)
- Dominant language
- C#
- Stars
- 26.8k
- Forks
- 1.7k
- PR merge metrics
- No merged PRs in 30d
Description
### 现象
使用 Watt Toolkit 加速 GitHub 时,部分 API 请求**间歇性 502 + 连接被强制关闭**(重试可恢复,非持续故障)。
### 证据(Windows 事件日志,.NET Runtime,BD.WTTS)
```
Category: BD.WTTS.Services.Implementation.RequestLoggingMiddleware
RequestPath: /esengine/DeepSeek-Reasonix/commit//status-details
GET https://github.com/esengine/DeepSeek-Reasonix/commit//status-details
responded 502 in 19270.2373 ms
System.Net.Http.HttpRequestException: An error occurred while sending the request.
---> System.IO.IOException: Unable to read data from the transport connection: 远程主机强迫关闭了一个现有的连接。
---> System.Net.Sockets.SocketException (10054): 远程主机强迫关闭了一个现有的连接。
```
### 环境
- Windows 10/11(x64)
- Watt Toolkit(Steam++)当前最新版(事件日志仅显示 `BD.WTTS` 命名空间,未含版本号)
- 复现路径:GitHub 网页/API 调用(commit status-details 类长请求)在加速开启时偶发
### 分析
- `SocketException (10054)` = 远端(代理出口或被代理的 github.com)强制关闭连接——发生在**请求发出后 ~19 秒**(长请求场景)
- 长请求(>10s,如 status-details/checks 聚合)更容易触发;短请求正常
- 怀疑:代理连接池的 keep-alive/超时与上游断开不一致,或出口 IP 被 GitHub 限流后断连
### 期望
- 长请求(>15s)不被强制断连;或断连后自动重试 1-2 次再报 502
- 日志中带上 Watt Toolkit 自身版本号,便于用户上报
(若需我补充抓包/复现步骤,请告知)
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with BD.WTTS.Services.Implementation.RequestLoggingMiddleware and trace the GitHub /commit//status-details request path that returns 502 after about 19 seconds. Reproduce the intermittent SocketException (10054) on Windows with acceleration enabled, then determine whether the completed work should prevent long-request disconnects, retry failed requests, or add the Watt Toolkit version to logs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- backend, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100