Added ConfigureAwait(false)

ConfigureAwait(false) is recommended on async calls?
http://blog.stephencleary.com/2012/07/dont-block-on-async-code.html
Credit: @dampeebe
This commit is contained in:
Steve Morgan
2015-11-02 10:26:25 +00:00
parent f0afa701bc
commit 839c0d011b

View File

@@ -70,7 +70,7 @@ namespace Umbraco.Web.Scheduling
try
{
var result = await wc.SendAsync(request, token);
var result = await wc.SendAsync(request, token).ConfigureAwait(false); // ConfigureAwait(false) is recommended? http://blog.stephencleary.com/2012/07/dont-block-on-async-code.html
return result.StatusCode == HttpStatusCode.OK;
}
catch (Exception ex)