ashleymills / Reachability.swift

Replacement for Apple's Reachability re-written in Swift with closures
MIT License
7.94k stars 948 forks source link

whenReachable called for both wifi going on and off #328

Open alexhunsley opened 5 years ago

alexhunsley commented 5 years ago

When using the following setup:

    reachability.whenReachable = { reachability in
            print("reachable called")
        }
    }
    reachability.whenUnreachable = { reachability in
            print("UNreachable called")
        }
    }

I get the first block getting called for both wifi going on and off. The unreachable block never gets called. I've stepped in with the debugger to confirm this.

iharandreyev commented 4 years ago

Same issue here. Tested on iPhone SE, iOS 13.3

iharandreyev commented 4 years ago

Ah, my bad. I had cellular enabled.