We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0bd1795 commit 47b5c82Copy full SHA for 47b5c82
src/RestSharp/.nvmrc
@@ -0,0 +1 @@
1
+v17.0.1
src/RestSharp/RestClient.cs
@@ -193,10 +193,18 @@ void DoBuildUriValidations(RestRequest request) {
193
);
194
}
195
196
+ readonly bool _disposeHttpClient;
197
+ bool _disposed;
198
+
199
+ protected virtual void Dispose(bool disposing) {
200
+ if (disposing && !_disposed) {
201
+ _disposed = true;
202
+ if (_disposeHttpClient) HttpClient.Dispose();
203
+ }
204
205
206
public void Dispose() {
- if (_disposeHttpClient) HttpClient.Dispose();
207
+ Dispose(true);
208
GC.SuppressFinalize(this);
209
-
- readonly bool _disposeHttpClient;
210
0 commit comments