HttpClient disposed in RestSharp 107

80 views
Skip to first unread message

Bo Ngoh

unread,
Jun 29, 2023, 10:51:54 AM6/29/23
to RestSharp
I created a singleton Restsharp client to share among multi-threaded calls to the same base url, but I'm getting ObjectDisposedException on the HttpClient within - what did I do wrong, was it because my Singleton was disposable and had code to dispose the Restsharp client?

Bo Ngoh

unread,
Jun 29, 2023, 11:06:10 PM6/29/23
to RestSharp
Cancelled - this was a strange issue, we fixed a bug on the database which was holding up a lot of calls due to timeouts then this happened, but then i also realised lots of other classes and dlls were having the same problem not just httpclient. Restarted the service and the issues all went away, going to put down the cause as most likely not Restsharp-related.
Reply all
Reply to author
Forward
0 new messages