-
Notifications
You must be signed in to change notification settings - Fork 293
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
ConnectionTimeout works fine on Linux but it does not on Windows #2070
Comments
Can you try adding Regarding the the timeout on netcore there is known issue and PR #2067 is addressing that. |
@JRahnama it seems to work. Do you think this will be fixed in a new version?
What is the Managed Network? |
well, the fact is on Windows netcore applications are using native SNI runtime files, whereas on Unix it uses managed SNI. This is the source of different error messages. Adding the context switch I provided will enable manage SNI on Windows as well. In some other words on Windows you are using a partially different code bases than Unix or when using AppContext switch. Our final goal would be using managed SNI every where when it is fully tested and addressed a couple of existing bugs, but I do not think this is going to happen in near future. As a workaround you can keep using the AppContext switch to get same results on Windows and Unix. |
Ok, thank's for the help. |
@mcNets Can you give it a try with the recent preview version, please? |
@DavoudEshtehari, Now it's working. Timeout = 5
Timeout = 3
I used this verion:
|
I am trying to set a ConnectionTimeout of 5 seconds and it works on Linux but it does not on Windows.
That is the code that I am using to test it:
On Linux I am getting this error message:
And on Windows:
As you can see is returning different Exception messages, and I cannot get less than 21 seconds on Windows.
I am using this package:
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.2.0-preview2.23159.1" />
Operating systems:
Windows 11 Pro 22H2
Debian GNU/Linux 11 (bullseye)
The text was updated successfully, but these errors were encountered: