Created
September 4, 2019 18:48
-
-
Save mps/c5ae0399f076187081393878dca9f702 to your computer and use it in GitHub Desktop.
Code I found today
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void) handleRequest | |
{ | |
// Wait up to five seconds for the network to be worth trying. | |
for (int i = 0; i < 5; i++) | |
{ | |
if (NetworkWorthTrying()) return; | |
[NSThread sleepForTimeInterval:1.0]; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment