Skip to content

Commit a028e01

Browse files
YuryNiakhaimoozzyk
authored andcommitted
fix memory leak
1 parent 11e727b commit a028e01

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Sources/SignalRClient/DefaultHttpClient.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ class DefaultHttpClient: HttpClientProtocol {
2424
)
2525
}
2626

27+
deinit {
28+
session.finishTasksAndInvalidate()
29+
}
30+
2731
func get(url: URL, completionHandler: @escaping (HttpResponse?, Error?) -> Void) {
2832
sendHttpRequest(url:url, method: "GET", body: nil, completionHandler: completionHandler)
2933
}

0 commit comments

Comments
 (0)