Skip to content

Commit d897bba

Browse files
author
Christiaan baes
committed
Corrected the automaticproxydetection so it now builds
Like it did before on my machine but I probably forgot to save
1 parent a0fe4b5 commit d897bba

File tree

3 files changed

+6
-23
lines changed

3 files changed

+6
-23
lines changed

Diff for: src/Elasticsearch.Net/Connection/ConnectionConfiguration.cs

+5-16
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ public class ConnectionConfiguration<T> : IConnectionConfigurationValues, IHideO
8282
#endif
8383
bool IConnectionConfigurationValues.KeepRawResponse { get{ return _keepRawResponse; } }
8484

85-
private bool _automatixProxyDetection;
86-
bool IConnectionConfigurationValues.AutomaticProxyDetection { get { return _automatixProxyDetection} }
85+
private bool _automaticProxyDetection = true;
86+
bool IConnectionConfigurationValues.AutomaticProxyDetection { get { return _automaticProxyDetection; } }
8787

8888
private int _maximumAsyncConnections;
8989
int IConnectionConfigurationValues.MaximumAsyncConnections { get{ return _maximumAsyncConnections; } }
@@ -287,21 +287,10 @@ protected void ConnectionStatusDefaultHandler(IElasticsearchResponse status)
287287
/// <summary>
288288
/// Global callback for every response that NEST receives, useful for custom logging.
289289
/// </summary>
290-
public T SetConnectionStatusHandler(Action<IElasticsearchResponse> handler)
291-
{
292-
handler.ThrowIfNull("handler");
293-
this._connectionStatusHandler = handler;
294-
return (T) this;
295-
}
296-
297-
/// <summary>
298-
/// Sometimes automatic proxydection can be very slow when there is no proxy that can be detected.
299-
/// </summary>
300-
/// <param name="enabled">defaults to true</param>
301-
/// <returns></returns>
302-
public T AutomatixProxyDetection(bool b = true)
290+
public T SetConnectionStatusHandler(Action<IElasticsearchResponse> handler)
303291
{
304-
this._automatixProxyDetection = b;
292+
handler.ThrowIfNull("handler");
293+
this._connectionStatusHandler = handler;
305294
return (T)this;
306295
}
307296
}

Diff for: src/Elasticsearch.Net/Connection/HttpConnection.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ private void SetProxyIfNeeded(HttpWebRequest myReq)
146146
proxy.Credentials = credentials;
147147
myReq.Proxy = proxy;
148148
}
149-
if(!this.ConnectionSettings.AutomatixProxyDetection)
149+
if(!this.ConnectionSettings.AutomaticProxyDetection)
150150
{
151151
myReq.Proxy = null;
152152
}

Diff for: src/Elasticsearch.Net/Connection/IConnectionConfiguration.cs

-6
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,5 @@ public interface IConnectionConfiguration<out T> : IHideObjectMembers
6666
/// </summary>
6767
T SetConnectionStatusHandler(Action<IElasticsearchResponse> handler);
6868

69-
/// <summary>
70-
/// Sometimes automatic proxydection can be very slow when there is no proxy that can be detected.
71-
/// </summary>
72-
/// <param name="enabled">defaults to true</param>
73-
/// <returns></returns>
74-
T AutomatixProxyDetection(bool enabled = true)
7569
}
7670
}

0 commit comments

Comments
 (0)