diff --git a/Sources/SignalRClient/DefaultHttpClient.swift b/Sources/SignalRClient/DefaultHttpClient.swift index 13edcec..daee66d 100644 --- a/Sources/SignalRClient/DefaultHttpClient.swift +++ b/Sources/SignalRClient/DefaultHttpClient.swift @@ -24,6 +24,10 @@ class DefaultHttpClient: HttpClientProtocol { ) } + deinit { + session.finishTasksAndInvalidate() + } + func get(url: URL, completionHandler: @escaping (HttpResponse?, Error?) -> Void) { sendHttpRequest(url:url, method: "GET", body: nil, completionHandler: completionHandler) }