Skip to content

Commit

Permalink
Fix flags
Browse files Browse the repository at this point in the history
  • Loading branch information
ubfelix committed Oct 4, 2024
1 parent 7202685 commit 7d1427b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Sources/UBFoundation/Networking/UBURLDataTask.swift
Original file line number Diff line number Diff line change
Expand Up @@ -166,15 +166,16 @@ public final class UBURLDataTask: UBURLSessionTask, CustomStringConvertible, Cus

/// Start the task with the given request. It will cancel any ongoing request
public func start(ignoreCache: Bool) {
flagsQueue.sync {
let f = flagsQueue.sync {
if ignoreCache {
flags.insert(.ignoreCache)
} else {
flags.remove(.ignoreCache)
}
flags.remove(.refresh)

return flags
}
let f = flagsQueue.sync { flags }
start(flags: f)
}

Expand Down

0 comments on commit 7d1427b

Please sign in to comment.