mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 10:18:54 +00:00
fix(apple): Fix retain cycle in Log.swift (#7861)
The previous developer introduced a retain cycle in Log.swift by strongly capturing `self` inside an async closure.
This commit is contained in:
@@ -196,6 +196,8 @@ private final class LogWriter {
|
||||
|
||||
jsonData.append(newLineData)
|
||||
|
||||
workQueue.async { self.handle.write(jsonData) }
|
||||
workQueue.async { [weak self] in
|
||||
self?.handle.write(jsonData)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user