Repository navigation
fix: 修复首次监听绑定失败后的自动恢复与资源回滚 - #73
Merged
Merged
Conversation
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
首次 Bind 失败会留下未监听的
_server,端口释放后仍无法恢复。本次改为在局部 Socket 完成配置、Bind/Listen 后发布,失败立即释放;监听器发布与停机释放互斥,迟到初始化不能在停机后重新占用端口。保留接受循环代次、单客户端关闭语义与公共 API。新增 7 项回归:日志同步点确认绑定失败后释放端口,验证自动接入、双向消息与第二客户端拒绝;取消/Dispose 各覆盖失败后的停机、已发布 Socket 关闭/端口释放、排队初始化与停机竞争。同步事件和锁控制顺序,不用固定睡眠判定恢复。CHANGELOG Unreleased 已更新。
验证:
dotnet build StreamFrame.slnx -c Release:0 警告、0 错误。dotnet test StreamFrame.slnx -c Release --no-build:net8.0/net10.0/net48 各 108 项通过。STREAMFRAME_SOAK_SECONDS=20 dotnet test StreamFrame.slnx -c Release --no-build --filter FullyQualifiedName~Soak_ReconnectRacing_LongRun:三框架各 1 项通过。这是 bug: 用户显式 Reconnect() 与自动重连竞速可长期楔死被动端监听(重绑失败 + 接受循环持有锁重试) #47 竞速短测,不代表 test: [P1] 校准混沌测试交付契约并调查消息计数失败与 net48 长测未收敛 #67 完整长测验收。Closes #63