Skip to content

Commit

Permalink
Merge pull request #847 from xPaw/fix-784
Browse files Browse the repository at this point in the history
Remove ContinueWith debug log in webapi
  • Loading branch information
yaakov-h authored May 15, 2020
2 parents c1261ae + 918f6b9 commit 7b86512
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions SteamKit2/SteamKit2/Steam/WebAPI/WebAPI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -210,24 +210,7 @@ internal AsyncInterface( HttpClient httpClient, string iface, string apiKey )
/// <exception cref="HttpRequestException">An network error occurred when performing the request.</exception>
/// <exception cref="WebAPIRequestException">A network error occurred when performing the request.</exception>
/// <exception cref="InvalidDataException">An error occured when parsing the response from the WebAPI.</exception>
public Task<KeyValue> CallAsync( HttpMethod method, string func, int version = 1, Dictionary<string, object>? args = null )
{
var task = CallAsyncCore( method, func, version, args );

task.ContinueWith( t =>
{
// we need to observe the exception in this OnlyOnFaulted continuation if our task throws an exception but we're not able to observe it
// (such as when waiting for the task times out, and an exception is thrown later)
// see: http://msdn.microsoft.com/en-us/library/dd997415.aspx

DebugLog.WriteLine("WebAPI", "Threw an unobserved exception: {0}", t.Exception);

}, TaskContinuationOptions.OnlyOnFaulted );

return task;
}

async Task<KeyValue> CallAsyncCore( HttpMethod method, string func, int version = 1, Dictionary<string, object>? args = null )
public async Task<KeyValue> CallAsync( HttpMethod method, string func, int version = 1, Dictionary<string, object>? args = null )
{
if ( method == null )
{
Expand Down

0 comments on commit 7b86512

Please sign in to comment.