Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import Network

public class PathMonitorConnectivityProvider: NSObject, ConnectivityProvider {

// Use .utility, as it is intended for tasks that the user does not track actively.
// See: https://developer.apple.com/documentation/dispatch/dispatchqos
private let queue = DispatchQueue.global(qos: .utility)
// Use a serial queue to ensure that all network updates and monitor events happen
// sequentially, preventing race conditions during deallocation.
private let queue = DispatchQueue(label: "dev.fluttercommunity.plus.connectivity")

private var pathMonitor: NWPathMonitor?

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import Network

public class PathMonitorConnectivityProvider: NSObject, ConnectivityProvider {

// Use .utility, as it is intended for tasks that the user does not track actively.
// See: https://developer.apple.com/documentation/dispatch/dispatchqos
private let queue = DispatchQueue.global(qos: .utility)
// Use a serial queue to ensure that all network updates and monitor events happen
// sequentially, preventing race conditions during deallocation.
private let queue = DispatchQueue(label: "dev.fluttercommunity.plus.connectivity")

private var pathMonitor: NWPathMonitor?

Expand Down
Loading