Skip to content

Commit

Permalink
fix memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
YuryNiakhai authored and moozzyk committed Jan 27, 2024
1 parent 11e727b commit a028e01
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Sources/SignalRClient/DefaultHttpClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit a028e01

Please sign in to comment.