Create new instance of the Client class exactly as the README example shows.
Call .Dispose().
Note that a StackOverflowException gets thrown.
What was expected?
I'd expect calling Dispose to not loop into a StackOverflowException.
Sample Code
using EasyPost;
namespace Example;
class ExampleClass
{
static async Task Main()
{
var client = new Client(new ClientConfiguration(Environment.GetEnvironmentVariable("EASYPOST_API_KEY")));
client.Dispose();
}
}
Relevant logs
Stack overflow.
Repeat 8025 times:
--------------------------------
at EasyPost.Client.Dispose(Boolean)
at EasyPost._base.EasyPostClient.Dispose()
at EasyPost._base.EasyPostService.Dispose(Boolean)
at EasyPost._base.EasyPostService.Dispose()
--------------------------------
at EasyPost.Client.Dispose(Boolean)
at EasyPost._base.EasyPostClient.Dispose()
at Example.ExampleClass+<Main>d__0.MoveNext()
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[System.__Canon, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec
85d7bea7798e]](System.__Canon ByRef)
at Example.ExampleClass.Main()
at Example.ExampleClass.<Main>()
Process finished with exit code -1,073,741,571.
Software Version
6.7.2
Language Version
.NET 8
Operating System
Mac Ventura 13.4
What happened?
What was expected?
I'd expect calling
Dispose
to not loop into a StackOverflowException.Sample Code
Relevant logs