Skip to content

Conversation

@drichelson
Copy link
Contributor

Stop doing internet things when we don't have internet access.

Log.e(TAG, "Exception when updating flags.", e);
}
if (isInternetConnected(context)) {
final OkHttpClient client = new OkHttpClient.Builder()
Copy link
Contributor Author

@drichelson drichelson Sep 12, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we keep the same client object around forever, the connection times out when transitioning from no internet to having internet. Creating a new client with each request removes that problem.

@jkodumal
Copy link
Contributor

👍

@drichelson drichelson merged commit d82734b into master Sep 13, 2016
@drichelson drichelson deleted the dr/airplaneMode branch September 13, 2016 01:46
drichelson added a commit that referenced this pull request May 18, 2017
UserManager: change listeners now controlled by synchronized block instead of SynchronizedMultiMap
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

Successfully merging this pull request may close these issues.

3 participants