MultiSubnetFailover parallel connect fails if one address errors immediately (managed SNI)
维护者通常 2 天内回复
评估
这个 Issue 还没有评估数据。
描述
Describe the bug
With MultiSubnetFailover=true, managed SNI (SniTcpHandle.ParallelConnect) connects to all resolved addresses in parallel. If one address fails immediately on Socket.Connect (any error other than WouldBlock, e.g. HostUnreachable, NetworkUnreachable, AddressFamilyNotSupported), the exception escapes the loop:
- The whole connection fails, even when another address is reachable.
- Sockets already created are not disposed.
Common case: a host resolves to IPv4 + IPv6, and the client has no IPv6 route (containers, VPNs, some cloud networks).
This matters more once MSF is on by default (#4876, #4927).
To reproduce
Call ParallelConnect with [<unreachable address>, 127.0.0.1] where a listener is on the loopback port. It throws instead of returning the loopback socket.
Expected behavior
Skip addresses that fail immediately, keep trying the rest, and dispose every non-selected socket on all exit paths.
Further technical details
Microsoft.Data.SqlClient: main
.NET: 10.0 (managed SNI; Unix, or Windows with managed networking)
- 主要语言
- C#
- 星标
- 1k
- 派生
- 352
- 平均合并
- 4 天 12 小时
- 30 天内合并 PR
- 86
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
dotnet/SqlClient 的其他 Issue
-
Sync ExecuteReader on an STA thread deadlocks against a StateChange handler that marshals to the UI thread (OpenAsyncRetry path)可能重新可做 @mdaigle 于 43 天前认领,目前没有进行中的 PR。 未关闭External :link:
难度 2/5 1-3 小时 新手友好度 64/100
dotnet/SqlClient#4534 · 2 条评论 · 已指派 1 人 ·
维护者通常 2 天内回复
-
Area\Tests
难度 2/5 1-3 小时 新手友好度 68/100
dotnet/SqlClient#4377 · 2 条评论 ·
维护者通常 2 天内回复
-
难度 4/5 3-5 天 新手友好度 62/100
dotnet/SqlClient#4957 · 2 条评论 ·
维护者通常 2 天内回复
-
难度 3/5 1-2 天 新手友好度 54/100
维护者通常 2 天内回复
-
Approval Needed Code Health :pill: Common Project 🚮 Design Review Needed Up-for-Grabs :raised_hands:
难度 5/5 一周以上 新手友好度 25/100
dotnet/SqlClient#4940 · 1 条评论 · 1 个 reaction ·
维护者通常 2 天内回复
相似的 Issue
-
good first issue
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
bug P2
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 85/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
-
bug godot
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 2 天内回复