Skip to content

Commit

Permalink
Fix deadlock in NetworkLogger
Browse files Browse the repository at this point in the history
  • Loading branch information
kabiroberai committed Dec 17, 2024
1 parent c102aaa commit 6383c7d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Sources/Pulse/NetworkLogger/NetworkLogger.swift
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ public final class NetworkLogger: @unchecked Sendable {
public func logTaskCreated(_ task: URLSessionTask) {
lock.lock()
guard tasks[TaskKey(task: task)] == nil else {
lock.unlock()
return // Already registered
}
let context = context(for: task)
Expand Down

0 comments on commit 6383c7d

Please sign in to comment.