Commit ef618429 authored by Marc Gravell's avatar Marc Gravell

consider SyncTimeout when forming default ConnectTimeout

parent 6f91df1b
...@@ -184,7 +184,13 @@ public CommandMap CommandMap ...@@ -184,7 +184,13 @@ public CommandMap CommandMap
/// <summary> /// <summary>
/// Specifies the time in milliseconds that should be allowed for connection /// Specifies the time in milliseconds that should be allowed for connection
/// </summary> /// </summary>
public int ConnectTimeout { get { return connectTimeout.GetValueOrDefault(5000); } set { connectTimeout = value; } } public int ConnectTimeout {
get {
if (connectTimeout.HasValue) return connectTimeout.GetValueOrDefault();
return Math.Max(5000, SyncTimeout); // default of 5 seconds unless SyncTimeout is higher
}
set { connectTimeout = value; }
}
/// <summary> /// <summary>
/// The server version to assume /// The server version to assume
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment