Skip to content

Commit

Permalink
Fix issue for HttpClient connection closed unexpectedly error after e…
Browse files Browse the repository at this point in the history
…vents submission. (#207)

* Recording exception details in logs to identify issues easier.

* Fix issue for HttpClient connection close error after events submission.
  • Loading branch information
edwardmeng authored and ejsmith committed Mar 15, 2019
1 parent c00d2ea commit ab9987e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Exceptionless/Submission/DefaultSubmissionClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ protected virtual HttpClient CreateHttpClient(ExceptionlessConfiguration config)
handler.Proxy = config.Proxy;

var client = new HttpClient(handler, true);
client.DefaultRequestHeaders.ConnectionClose = true;
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
client.DefaultRequestHeaders.ExpectContinue = false;
client.DefaultRequestHeaders.UserAgent.ParseAdd(config.UserAgent);
Expand Down

0 comments on commit ab9987e

Please sign in to comment.