Fix issue #86 - Timeout on Friendica instances

This commit is contained in:
Thomas 2022-05-23 14:53:37 +02:00
parent 3ec8f821e6
commit 3ec4437a5b
14 changed files with 14 additions and 0 deletions

View file

@ -64,6 +64,7 @@ public class AccountsVM extends AndroidViewModel {
final OkHttpClient okHttpClient = new OkHttpClient.Builder() final OkHttpClient okHttpClient = new OkHttpClient.Builder()
.readTimeout(60, TimeUnit.SECONDS) .readTimeout(60, TimeUnit.SECONDS)
.connectTimeout(60, TimeUnit.SECONDS) .connectTimeout(60, TimeUnit.SECONDS)
.callTimeout(60, TimeUnit.SECONDS)
.proxy(Helper.getProxy(getApplication().getApplicationContext())) .proxy(Helper.getProxy(getApplication().getApplicationContext()))
.build(); .build();

View file

@ -42,6 +42,7 @@ public class AdminVM extends AndroidViewModel {
final OkHttpClient okHttpClient = new OkHttpClient.Builder() final OkHttpClient okHttpClient = new OkHttpClient.Builder()
.readTimeout(60, TimeUnit.SECONDS) .readTimeout(60, TimeUnit.SECONDS)
.connectTimeout(60, TimeUnit.SECONDS) .connectTimeout(60, TimeUnit.SECONDS)
.callTimeout(60, TimeUnit.SECONDS)
.proxy(Helper.getProxy(getApplication().getApplicationContext())) .proxy(Helper.getProxy(getApplication().getApplicationContext()))
.build(); .build();
private MutableLiveData<AdminAccount> adminAccountMutableLiveData; private MutableLiveData<AdminAccount> adminAccountMutableLiveData;

View file

@ -41,6 +41,7 @@ public class AnnouncementsVM extends AndroidViewModel {
final OkHttpClient okHttpClient = new OkHttpClient.Builder() final OkHttpClient okHttpClient = new OkHttpClient.Builder()
.readTimeout(60, TimeUnit.SECONDS) .readTimeout(60, TimeUnit.SECONDS)
.connectTimeout(60, TimeUnit.SECONDS) .connectTimeout(60, TimeUnit.SECONDS)
.callTimeout(60, TimeUnit.SECONDS)
.proxy(Helper.getProxy(getApplication().getApplicationContext())) .proxy(Helper.getProxy(getApplication().getApplicationContext()))
.build(); .build();
private MutableLiveData<Announcement> announcementMutableLiveData; private MutableLiveData<Announcement> announcementMutableLiveData;

View file

@ -40,6 +40,7 @@ public class AppsVM extends AndroidViewModel {
final OkHttpClient okHttpClient = new OkHttpClient.Builder() final OkHttpClient okHttpClient = new OkHttpClient.Builder()
.readTimeout(60, TimeUnit.SECONDS) .readTimeout(60, TimeUnit.SECONDS)
.connectTimeout(60, TimeUnit.SECONDS) .connectTimeout(60, TimeUnit.SECONDS)
.callTimeout(60, TimeUnit.SECONDS)
.proxy(Helper.getProxy(getApplication().getApplicationContext())) .proxy(Helper.getProxy(getApplication().getApplicationContext()))
.build(); .build();
private MutableLiveData<App> appMutableLiveData; private MutableLiveData<App> appMutableLiveData;

View file

@ -39,6 +39,7 @@ public class InstanceSocialVM extends AndroidViewModel {
final OkHttpClient okHttpClient = new OkHttpClient.Builder() final OkHttpClient okHttpClient = new OkHttpClient.Builder()
.readTimeout(60, TimeUnit.SECONDS) .readTimeout(60, TimeUnit.SECONDS)
.connectTimeout(60, TimeUnit.SECONDS) .connectTimeout(60, TimeUnit.SECONDS)
.callTimeout(60, TimeUnit.SECONDS)
.proxy(Helper.getProxy(getApplication().getApplicationContext())) .proxy(Helper.getProxy(getApplication().getApplicationContext()))
.build(); .build();
private final InstancesSocialService instancesSocialService; private final InstancesSocialService instancesSocialService;

View file

@ -48,6 +48,7 @@ public class InstancesVM extends AndroidViewModel {
final OkHttpClient okHttpClient = new OkHttpClient.Builder() final OkHttpClient okHttpClient = new OkHttpClient.Builder()
.readTimeout(60, TimeUnit.SECONDS) .readTimeout(60, TimeUnit.SECONDS)
.connectTimeout(60, TimeUnit.SECONDS) .connectTimeout(60, TimeUnit.SECONDS)
.callTimeout(60, TimeUnit.SECONDS)
.proxy(Helper.getProxy(getApplication().getApplicationContext())) .proxy(Helper.getProxy(getApplication().getApplicationContext()))
.build(); .build();
private MutableLiveData<EmojiInstance> emojiInstanceMutableLiveData; private MutableLiveData<EmojiInstance> emojiInstanceMutableLiveData;

View file

@ -41,6 +41,7 @@ public class JoinInstancesVM extends AndroidViewModel {
final OkHttpClient okHttpClient = new OkHttpClient.Builder() final OkHttpClient okHttpClient = new OkHttpClient.Builder()
.readTimeout(60, TimeUnit.SECONDS) .readTimeout(60, TimeUnit.SECONDS)
.connectTimeout(60, TimeUnit.SECONDS) .connectTimeout(60, TimeUnit.SECONDS)
.callTimeout(60, TimeUnit.SECONDS)
.proxy(Helper.getProxy(getApplication().getApplicationContext())) .proxy(Helper.getProxy(getApplication().getApplicationContext()))
.build(); .build();
private final String base_url; private final String base_url;

View file

@ -46,6 +46,7 @@ public class NotificationsVM extends AndroidViewModel {
final OkHttpClient okHttpClient = new OkHttpClient.Builder() final OkHttpClient okHttpClient = new OkHttpClient.Builder()
.readTimeout(60, TimeUnit.SECONDS) .readTimeout(60, TimeUnit.SECONDS)
.connectTimeout(60, TimeUnit.SECONDS) .connectTimeout(60, TimeUnit.SECONDS)
.callTimeout(60, TimeUnit.SECONDS)
.proxy(Helper.getProxy(getApplication().getApplicationContext())) .proxy(Helper.getProxy(getApplication().getApplicationContext()))
.build(); .build();

View file

@ -40,6 +40,7 @@ public class OauthVM extends AndroidViewModel {
final OkHttpClient okHttpClient = new OkHttpClient.Builder() final OkHttpClient okHttpClient = new OkHttpClient.Builder()
.readTimeout(60, TimeUnit.SECONDS) .readTimeout(60, TimeUnit.SECONDS)
.connectTimeout(60, TimeUnit.SECONDS) .connectTimeout(60, TimeUnit.SECONDS)
.callTimeout(60, TimeUnit.SECONDS)
.proxy(Helper.getProxy(getApplication().getApplicationContext())) .proxy(Helper.getProxy(getApplication().getApplicationContext()))
.build(); .build();
private MutableLiveData<Token> tokenMutableLiveData; private MutableLiveData<Token> tokenMutableLiveData;

View file

@ -32,6 +32,7 @@ public class OembedVM extends AndroidViewModel {
final OkHttpClient okHttpClient = new OkHttpClient.Builder() final OkHttpClient okHttpClient = new OkHttpClient.Builder()
.readTimeout(60, TimeUnit.SECONDS) .readTimeout(60, TimeUnit.SECONDS)
.connectTimeout(60, TimeUnit.SECONDS) .connectTimeout(60, TimeUnit.SECONDS)
.callTimeout(60, TimeUnit.SECONDS)
.proxy(Helper.getProxy(getApplication().getApplicationContext())) .proxy(Helper.getProxy(getApplication().getApplicationContext()))
.build(); .build();

View file

@ -45,6 +45,7 @@ public class ReorderVM extends AndroidViewModel {
final OkHttpClient okHttpClient = new OkHttpClient.Builder() final OkHttpClient okHttpClient = new OkHttpClient.Builder()
.readTimeout(60, TimeUnit.SECONDS) .readTimeout(60, TimeUnit.SECONDS)
.connectTimeout(60, TimeUnit.SECONDS) .connectTimeout(60, TimeUnit.SECONDS)
.callTimeout(60, TimeUnit.SECONDS)
.proxy(Helper.getProxy(getApplication().getApplicationContext())) .proxy(Helper.getProxy(getApplication().getApplicationContext()))
.build(); .build();
private MutableLiveData<Results> resultsMutableLiveData; private MutableLiveData<Results> resultsMutableLiveData;

View file

@ -46,6 +46,7 @@ public class SearchVM extends AndroidViewModel {
final OkHttpClient okHttpClient = new OkHttpClient.Builder() final OkHttpClient okHttpClient = new OkHttpClient.Builder()
.readTimeout(60, TimeUnit.SECONDS) .readTimeout(60, TimeUnit.SECONDS)
.connectTimeout(60, TimeUnit.SECONDS) .connectTimeout(60, TimeUnit.SECONDS)
.callTimeout(60, TimeUnit.SECONDS)
.proxy(Helper.getProxy(getApplication().getApplicationContext())) .proxy(Helper.getProxy(getApplication().getApplicationContext()))
.build(); .build();
private MutableLiveData<Results> resultsMutableLiveData; private MutableLiveData<Results> resultsMutableLiveData;

View file

@ -80,6 +80,7 @@ public class StatusesVM extends AndroidViewModel {
return new OkHttpClient.Builder() return new OkHttpClient.Builder()
.readTimeout(60, TimeUnit.SECONDS) .readTimeout(60, TimeUnit.SECONDS)
.connectTimeout(60, TimeUnit.SECONDS) .connectTimeout(60, TimeUnit.SECONDS)
.callTimeout(60, TimeUnit.SECONDS)
.proxy(Helper.getProxy(getApplication().getApplicationContext())) .proxy(Helper.getProxy(getApplication().getApplicationContext()))
.build(); .build();
} }

View file

@ -56,6 +56,7 @@ public class TimelinesVM extends AndroidViewModel {
final OkHttpClient okHttpClient = new OkHttpClient.Builder() final OkHttpClient okHttpClient = new OkHttpClient.Builder()
.readTimeout(60, TimeUnit.SECONDS) .readTimeout(60, TimeUnit.SECONDS)
.connectTimeout(60, TimeUnit.SECONDS) .connectTimeout(60, TimeUnit.SECONDS)
.callTimeout(60, TimeUnit.SECONDS)
.proxy(Helper.getProxy(getApplication().getApplicationContext())) .proxy(Helper.getProxy(getApplication().getApplicationContext()))
.build(); .build();