Reachability icon indicating copy to clipboard operation
Reachability copied to clipboard

Sometimes unreachableBlock gets called when internet is turned back on.

Open jgervin opened this issue 11 years ago • 8 comments

I am having the same issue is this http://stackoverflow.com/questions/19367351/tony-million-reachability-says-unreachable-when-connected

I tried to fix by using a delay for the code called in the unreachable block, but then cancel all delayed method calls if reachableBlock is called.

This is huge problem!

jgervin avatar Jan 24 '14 04:01 jgervin

Do you get a follow up "reachable" at all?

tonymillion avatar Jan 24 '14 08:01 tonymillion

In addition can you give me a system spec so I can try and replicate it.

Have you seen this comment: https://github.com/tonymillion/Reachability/blob/master/Reachability.m#L243

tonymillion avatar Jan 24 '14 08:01 tonymillion

Seeing this also in simulator and multiple devices on iOS8. unreachable block is called and isReachable is false, yet my requests are succeeding.

In reachabilityChanged:, the flags parameter is 0.

0xc00010ff avatar Jan 07 '15 18:01 0xc00010ff

To fix it you can use -reachabilityForInternetConnection instead -reachabilityWithHostname.

SoundBlaster avatar Jan 09 '15 21:01 SoundBlaster

Yep, I'm seeing this too. Turn off Wifi and unreachableBlock gets called. Turn wifi back on and both reachableBlock and unreachableBlock get called. Unfortunately unreachableBlock get's called after. Normally I set a property here to indicate no network so it's a problem although I could work round it. Be nice to have a fix though....

wuf810 avatar Apr 16 '15 21:04 wuf810

Having the same problem in simulator 8.3

sadiq81 avatar Jun 06 '15 21:06 sadiq81

+1 to having this issue. +1 to resolving it by changing from reachabilityForInternetConnection to reachabilityWithHostname

egold avatar Aug 24 '15 22:08 egold

+1 having this issue as well and it looks like this is a bug with SCNetworkReachability to me as various libraries that use it (AFNetworking,KSReachability, this one) have this same issue

isadon avatar Sep 13 '15 04:09 isadon