Skip to content

Commit

Permalink
Add default intial ping interval
Browse files Browse the repository at this point in the history
  • Loading branch information
Kisty committed Oct 11, 2016
1 parent 91671ec commit fed5904
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public class ReactiveNetwork {
private static final String DEFAULT_PING_HOST = "www.google.com";
private static final int DEFAULT_PING_PORT = 80;
private static final int DEFAULT_PING_INTERVAL_IN_MS = 2000;
private static final int DEFAULT_INITIAL_PING_INTERVAL_IN_MS = DEFAULT_PING_INTERVAL_IN_MS;
private static final int DEFAULT_PING_TIMEOUT_IN_MS = 2000;

protected ReactiveNetwork() {
Expand Down Expand Up @@ -101,7 +102,7 @@ public static Observable<Connectivity> observeNetworkConnectivity(final Context
* and false if not
*/
public static Observable<Boolean> observeInternetConnectivity() {
return observeInternetConnectivity(DEFAULT_PING_INTERVAL_IN_MS, DEFAULT_PING_INTERVAL_IN_MS, DEFAULT_PING_HOST,
return observeInternetConnectivity(DEFAULT_INITIAL_PING_INTERVAL_IN_MS, DEFAULT_PING_INTERVAL_IN_MS, DEFAULT_PING_HOST,
DEFAULT_PING_PORT, DEFAULT_PING_TIMEOUT_IN_MS);
}

Expand Down

0 comments on commit fed5904

Please sign in to comment.