[GFX-305] fix(connection): 统一 PipeConnectionBase 协议错误处 CloseReason 命名空间限定 - #10
Conversation
将 ReadPipeAsync 协议错误分支的 SuperSocket.Connection.CloseReason.ProtocolError 改为 Connection.CloseReason.ProtocolError,与同项目兄弟文件(PipeConnection.cs、ConnectionBase.cs)保持一致,消除对 C# 命名空间向上隐式查找的依赖。两者解析为同一类型 GameFrameX.SuperSocket.Connection.CloseReason,无行为变化。 Linear: GFX-305
|
Warning Review limit reached
Next review available in: 28 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Comment |
关联
Linear: GFX-305
背景
issue 引用的三个上游 commit(c21bccfe / a26052c / 81d8e2e)对
PipeConnectionBase.cs的功能性修复(consumed 赋值、服务端关闭流程、long Consumed / GetPosition / needReadMore)已在 main 存在 —— 该仓在 2025-04-21 通过6dad878d(同步上游f68fe7960)引入,当前代码与上游 kerryjiang/SuperSocket master 在该文件功能逻辑上一致。reader.AdvanceTo(consumed, buffer.End)双参写法是比 81d8e2e(单参)更新的上游行为,避免了单参在不完整分包场景下的忙循环,当前代码正确。本次改动
统一
src/GameFrameX.SuperSocket.Connection/PipeConnectionBase.cs:418协议错误分支的 CloseReason 命名空间限定:SuperSocket.Connection.CloseReason.ProtocolError→Connection.CloseReason.ProtocolError与同项目兄弟文件(PipeConnection.cs:117/142、ConnectionBase.cs:106 统一用
Connection.CloseReason.X)保持一致,消除对 C# 命名空间向上隐式查找的依赖。两者解析为同一类型GameFrameX.SuperSocket.Connection.CloseReason,无行为变化。验证
dotnet build GameFrameX.SuperSocket.sln→ 0 Error(227 既有 warning,与改动无关)。