Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connection Resiliency does not seem to be working #304

Closed
David-Engel opened this issue Nov 13, 2019 · 2 comments
Closed

Connection Resiliency does not seem to be working #304

David-Engel opened this issue Nov 13, 2019 · 2 comments
Assignees
Labels
🐛 Bug! Issues that are bugs in the drivers we maintain.
Milestone

Comments

@David-Engel
Copy link
Contributor

Describe the bug

In a simple unplug and re-plug of the network cable, connection resiliency seems to have stopped working between System.Data.SqlClient 4.6.0 and Microsoft.Data.SqlClient 1.0.19269.1.

To reproduce

smo-test-master.zip

Using the attached solution, build and run with a command line connection string against a remote SQL Server instance (I used SQL Server 2017 on the same wired LAN): "Data Source=[remote host];Trusted_Connection=true;Pooling=False;Connect Timeout=30;"

Unplug your network cable for 30 seconds when prompted. Plug it back in a wait 7-8 seconds for the network to come back up. Press a key to continue and note the exception that the connection is closed.

Expected behavior

Using System.Data.SqlClient 4.6.0, the ExecuteReader() following the connection interruption succeeds. I would expect Microsoft.Data.SqlClient to succeed, too.

Further technical details

Microsoft.Data.SqlClient version: 1.0.19269.1
.NET target: Core 2.2
SQL Server version: SQL Server 2017
Operating system: Windows 10

Additional context
Others have reproduced this over WiFi by disconnecting and reconnecting WiFi, too. I was not able to reproduce this against an Azure SQL DB endpoint.

@David-Engel David-Engel added the 🐛 Bug! Issues that are bugs in the drivers we maintain. label Nov 13, 2019
@David-Engel David-Engel added this to the 1.1.0 milestone Nov 13, 2019
@cheenamalhotra
Copy link
Member

Additional Info:

This issue was also reproduced on System.Data.SqlClient 4.7.0 (.NET Core), so seems to be introduced in one of the earlier PRs merged in CoreFx.

@cheenamalhotra
Copy link
Member

Merged in #310 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug! Issues that are bugs in the drivers we maintain.
Projects
None yet
Development

No branches or pull requests

2 participants