Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corefx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Lipnin <v-maxlip@microsoft.com>2019-06-26 11:29:51 +0300
committerMaxim Lipnin <v-maxlip@microsoft.com>2019-06-26 11:29:51 +0300
commitf7ed650f5ea30097eb5c2de2fd37af3223da6c63 (patch)
tree0282d13fad57c027cea93153eaed5756974fe6e9
parentd5f406ea037710aaf2c6b1bd4fe92fa723068a3a (diff)
Fix the issue where SQL connection hangs with zero-connection timeout
-rw-r--r--src/System.Data.SqlClient/src/System/Data/SqlClient/SNI/SNITcpHandle.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/System.Data.SqlClient/src/System/Data/SqlClient/SNI/SNITcpHandle.cs b/src/System.Data.SqlClient/src/System/Data/SqlClient/SNI/SNITcpHandle.cs
index 11ea8d0eaf..929c0531bc 100644
--- a/src/System.Data.SqlClient/src/System/Data/SqlClient/SNI/SNITcpHandle.cs
+++ b/src/System.Data.SqlClient/src/System/Data/SqlClient/SNI/SNITcpHandle.cs
@@ -142,7 +142,7 @@ namespace System.Data.SqlClient.SNI
}
else
{
- _socket = Connect(serverName, port, ts);
+ _socket = Connect(serverName, port, isInfiniteTimeOut ? TimeSpan.FromMilliseconds(Int32.MaxValue) : ts);
}
if (_socket == null || !_socket.Connected)