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:
authorSteve Pfister <steveisok@users.noreply.github.com>2019-06-26 15:09:09 +0300
committerGitHub <noreply@github.com>2019-06-26 15:09:09 +0300
commitb7a9aef96775f1d2d5a4ffb59ad691dc3b67d005 (patch)
tree0282d13fad57c027cea93153eaed5756974fe6e9
parentd5f406ea037710aaf2c6b1bd4fe92fa723068a3a (diff)
parentf7ed650f5ea30097eb5c2de2fd37af3223da6c63 (diff)
Merge pull request #303 from MaximLipnin/fix_sql_connection
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)