From e2c74f164557d4c24dfd665d925d5925019b9250 Mon Sep 17 00:00:00 2001 From: Arthur Date: Sat, 14 Dec 2024 19:54:55 +0200 Subject: [PATCH] Implement IDisposable to dispose underlying HttpClient --- RqliteDotnet/RqliteClient.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/RqliteDotnet/RqliteClient.cs b/RqliteDotnet/RqliteClient.cs index 7621886..a0a81c7 100644 --- a/RqliteDotnet/RqliteClient.cs +++ b/RqliteDotnet/RqliteClient.cs @@ -4,7 +4,7 @@ namespace RqliteDotnet; -public class RqliteClient : IRqliteClient +public class RqliteClient : IRqliteClient, IDisposable { private readonly HttpClient _httpClient; @@ -147,4 +147,9 @@ private string GetParameters(DbFlag? flags) return x; } + + public void Dispose() + { + _httpClient.Dispose(); + } }