Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

MultiSubnetFailover parallel connect fails if one address errors immediately (managed SNI)

Aperta
#4,928 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

@cheenamalhotra ci sta già lavorando.

Dal 27/10/2026.

  • #4929 di @cheenamalhotra — aperta

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

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)

Lingua principale
C#
Stelle
1k
Fork
352
Merge medio
4g 17h
PR unite (30g)
82

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di dotnet/SqlClient

Tutte le issue di dotnet/SqlClient

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.