@@ -53,7 +53,10 @@ public class ConnectionConfiguration<T> : IConnectionConfigurationValues, IHideO
53
53
int IConnectionConfigurationValues . Timeout { get { return _timeout ; } }
54
54
55
55
private int ? _pingTimeout ;
56
- int ? IConnectionConfigurationValues . PingTimeout { get { return _pingTimeout ; } }
56
+ int ? IConnectionConfigurationValues . PingTimeout { get { return _pingTimeout ; } }
57
+
58
+ private int ? _connectTimeout ;
59
+ int ? IConnectionConfigurationValues . ConnectTimeout { get { return _connectTimeout ; } }
57
60
58
61
private int ? _deadTimeout ;
59
62
int ? IConnectionConfigurationValues . DeadTimeout { get { return _deadTimeout ; } }
@@ -240,8 +243,8 @@ public T SetGlobalQueryStringParameters(NameValueCollection queryStringParameter
240
243
}
241
244
242
245
/// <summary>
243
- /// Timeout in milliseconds when the .NET webrequest should abort the request, note that you can set this to a high value here,
244
- /// and specify the timeout in various calls on Elasticsearch's side.
246
+ /// Sets the default timeout in milliseconds for each request to Elasticsearch.
247
+ /// NOTE: You can set this to a high value here, and specify the timeout on Elasticsearch's side.
245
248
/// </summary>
246
249
/// <param name="timeout">time out in milliseconds</param>
247
250
public T SetTimeout ( int timeout )
@@ -251,15 +254,25 @@ public T SetTimeout(int timeout)
251
254
}
252
255
253
256
/// <summary>
254
- /// This is a separate timeout for Ping() requests. A ping should fail as fast as possible.
257
+ /// Sets the default ping timeout in milliseconds for ping requests, which are used
258
+ /// to determine whether a node is alive. Pings should fail as fast as possible.
255
259
/// </summary>
256
- /// <param name="timeout">The ping timeout in milliseconds defaults to 200 </param>
260
+ /// <param name="timeout">The ping timeout in milliseconds defaults to 1000, or 2000 is using SSL. </param>
257
261
public T SetPingTimeout ( int timeout )
258
262
{
259
263
this . _pingTimeout = timeout ;
260
264
return ( T ) this ;
261
265
}
262
266
267
+ /// <summary>
268
+ /// Sets the default connection timeout in milliseconds.
269
+ /// </summary>
270
+ public T SetConnectTimeout ( int timeout )
271
+ {
272
+ this . _connectTimeout = timeout ;
273
+ return ( T ) this ;
274
+ }
275
+
263
276
/// <summary>
264
277
/// Sets the default dead timeout factor when a node has been marked dead.
265
278
/// </summary>
0 commit comments