diff options
author | Steve Pfister <steveisok@users.noreply.github.com> | 2019-06-26 15:09:09 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-26 15:09:09 +0300 |
commit | b7a9aef96775f1d2d5a4ffb59ad691dc3b67d005 (patch) | |
tree | 0282d13fad57c027cea93153eaed5756974fe6e9 | |
parent | d5f406ea037710aaf2c6b1bd4fe92fa723068a3a (diff) | |
parent | f7ed650f5ea30097eb5c2de2fd37af3223da6c63 (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.cs | 2 |
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) |