Closed YuKitsune closed 2 years ago
Looking at this code, I'm now wondering why it only tries to dispose customHeaders
when an exception has occurred. It seems to me that it either should always be disposing, or it never actually needs to dispose.
Regardless, this PR is an improvement, so thanks for the contribution!
LibGit2Sharp 0.27.0-preview-0182 includes this change.
Fixes https://github.com/libgit2/libgit2sharp/issues/1912
Couldn't really find a good spot to add tests here, open to suggestions.