Skip to content
Open
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
8 changes: 5 additions & 3 deletions Reachability/Reachability.swift
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public class Reachability {
public extension Reachability {

// MARK: - *** Notifier methods ***
func startNotifier() throws {
func startNotifier(withImmediateCheck checkImmediately: Bool = true) throws {

guard let reachabilityRef = reachabilityRef, !notifierRunning else { return }

Expand All @@ -159,8 +159,10 @@ public extension Reachability {
}

// Perform an intial check
reachabilitySerialQueue.async {
self.reachabilityChanged()
if checkImmediately {
reachabilitySerialQueue.async {
self.reachabilityChanged()
}
}

notifierRunning = true
Expand Down