Skip to content

Commit 5f42a2a

Browse files
committed
fix: add explicit self capture in async dns flush closure
1 parent 5ce9097 commit 5f42a2a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

TomeHelper/HostsEditor.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ class HostsEditor {
105105

106106
private func flushDNSCache() {
107107
// run async so a hung process can't block the main RunLoop timer
108-
DispatchQueue.global(qos: .utility).async {
108+
DispatchQueue.global(qos: .utility).async { [self] in
109109
let task = Process()
110110
task.launchPath = "/usr/bin/dscacheutil"
111111
task.arguments = ["-flushcache"]

0 commit comments

Comments
 (0)