Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sometimes unreachableBlock gets called when internet is turned back on. #59

Open
jgervin opened this issue Jan 24, 2014 · 8 comments
Open

Comments

@jgervin
Copy link

jgervin commented Jan 24, 2014

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!

@tonymillion
Copy link
Owner

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

@tonymillion
Copy link
Owner

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

@skurfer skurfer mentioned this issue Feb 5, 2014
@0xc00010ff
Copy link

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.

@SoundBlaster
Copy link

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

@wuf810
Copy link

wuf810 commented Apr 16, 2015

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....

@sadiq81
Copy link

sadiq81 commented Jun 6, 2015

Having the same problem in simulator 8.3

@egold
Copy link

egold commented Aug 24, 2015

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

@isadon
Copy link

isadon commented Sep 13, 2015

+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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants