Skip to content

Commit

Permalink
Merge pull request #312 from kabiroberai/kabir/fix-networklogger-dead…
Browse files Browse the repository at this point in the history
…lock

Fix deadlock in NetworkLogger
  • Loading branch information
kean authored Dec 18, 2024
2 parents c102aaa + 6383c7d commit 07cad09
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 07cad09

Please sign in to comment.