Skip to content

Commit 2b14c39

Browse files
committed
more [weak self] annotations in fire-and-forget tasks
1 parent fecc268 commit 2b14c39

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/SwiftOCA/OCP.1/Backend/Ocp1NWConnection.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public class Ocp1NWConnection: Ocp1Connection, Ocp1MutableConnection {
8484
_nwConnection = try NWConnection(to: nwEndpoint, using: parameters)
8585
_nwConnection.stateUpdateHandler = { [weak self] state in
8686
if let self, state == .cancelled {
87-
Task { try await self.disconnect() }
87+
Task { [weak self] in try await self?.disconnect() }
8888
}
8989
}
9090
_queue = DispatchQueue(label: connectionPrefix, attributes: .concurrent)

0 commit comments

Comments
 (0)