smashraid / NLog.Splunk

Splunk target to send logs in splunk
0 stars 1 forks source link

Avoid disposing the HttpClient #2

Closed snakefoot closed 6 years ago

snakefoot commented 6 years ago

https://github.com/smashraid/NLog.Splunk/blob/f51a01c4caf31cc08cb52ffd43bfa3bbf6a36b48/NLog.Splunk/NLog.Splunk/SplunkTarget.cs#L92

Instead allocate once, and reuse forever. See also -> https://aspnetmonsters.com/2016/08/2016-08-27-httpclientwrong/

smashraid commented 6 years ago

Released v1.0.1