Commit 6255ed21 authored by ilushka85's avatar ilushka85

make methods async

parent 70d144f3
......@@ -24,13 +24,13 @@ namespace Titanium.Web.Proxy
set;
}
//parameter is list of headers
public Func<IEnumerable<HttpHeader>, ExternalProxy> GetCustomUpStreamHttpProxyFunc
public Func<IEnumerable<HttpHeader>, Task<ExternalProxy>> GetCustomUpStreamHttpProxyFunc
{
get;
set;
}
//parameter is list of headers
public Func<IEnumerable<HttpHeader>, ExternalProxy> GetCustomUpStreamHttpsProxyFunc
public Func<IEnumerable<HttpHeader>, Task<ExternalProxy>> GetCustomUpStreamHttpsProxyFunc
{
get;
set;
......
......@@ -435,7 +435,7 @@ namespace Titanium.Web.Proxy
{
if (GetCustomUpStreamHttpProxyFunc != null)
{
customUpStreamHttpProxy = GetCustomUpStreamHttpProxyFunc(args.WebSession.Request.RequestHeaders.Values);
customUpStreamHttpProxy = await GetCustomUpStreamHttpProxyFunc(args.WebSession.Request.RequestHeaders.Values).ConfigureAwait(false);
}
}
else
......@@ -446,7 +446,7 @@ namespace Titanium.Web.Proxy
{
connectHeaders.Add(header);
}
customUpStreamHttpsProxy = GetCustomUpStreamHttpsProxyFunc(connectHeaders);
customUpStreamHttpsProxy = await GetCustomUpStreamHttpsProxyFunc(connectHeaders).ConfigureAwait(false);
}
}
......
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