Skip to content
This repository has been archived by the owner on Mar 4, 2020. It is now read-only.
This repository has been archived by the owner on Mar 4, 2020. It is now read-only.

Reachability check on init #19

Closed
DerAndereAndi opened this issue Dec 28, 2011 · 3 comments
Closed

Reachability check on init #19

DerAndereAndi opened this issue Dec 28, 2011 · 3 comments

Comments

@DerAndereAndi
Copy link

If I am reading the source correctly, you are checking for reachability in the init method on the main thread: https://github.com/MugunthKumar/MKNetworkKit/blob/master/MKNetworkKit/MKNetworkEngine.m#L93

This should not be done, since it might lock up the application if there is no or hardly network available, and cause the app to be killed by the watchdog.

As Apple reminded lots of times in its sessions in all past WWDCs, reachability should only be used after a connection failed and not before connecting. Also it should never be done in the main thread on startup.

P.S.: I saw other developers doing this and having loads of problems, including crashes on startup, due to the watchdog coming up.

@jomnius
Copy link

jomnius commented Jan 5, 2012

(just supporting this important design issue, so that it won't be forgotten)

@adamransom
Copy link

+1 for not forgetting about this

@MugunthKumar
Copy link
Owner

Closed as fixed

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

No branches or pull requests

4 participants