mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-05-08 09:18:39 +01:00
Change websocket keepalive response time to 20s.
This commit is contained in:
+4
-4
@@ -58,8 +58,8 @@ import static org.whispersystems.signalservice.internal.websocket.WebSocketProto
|
||||
|
||||
public class WebSocketConnection extends WebSocketListener {
|
||||
|
||||
private static final String TAG = WebSocketConnection.class.getSimpleName();
|
||||
public static final int KEEPALIVE_TIMEOUT_SECONDS = 30;
|
||||
private static final String TAG = WebSocketConnection.class.getSimpleName();
|
||||
public static final int KEEPALIVE_FREQUENCY_SECONDS = 30;
|
||||
|
||||
private final LinkedList<WebSocketRequestMessage> incomingRequests = new LinkedList<>();
|
||||
private final Map<Long, OutgoingRequest> outgoingRequests = new HashMap<>();
|
||||
@@ -143,9 +143,9 @@ public class WebSocketConnection extends WebSocketListener {
|
||||
OkHttpClient.Builder clientBuilder = new OkHttpClient.Builder().sslSocketFactory(new Tls12SocketFactory(socketFactory.first()),
|
||||
socketFactory.second())
|
||||
.connectionSpecs(serviceUrl.getConnectionSpecs().orElse(Util.immutableList(ConnectionSpec.RESTRICTED_TLS)))
|
||||
.readTimeout(KEEPALIVE_TIMEOUT_SECONDS + 10, TimeUnit.SECONDS)
|
||||
.readTimeout(KEEPALIVE_FREQUENCY_SECONDS + 10, TimeUnit.SECONDS)
|
||||
.dns(dns.orElse(Dns.SYSTEM))
|
||||
.connectTimeout(KEEPALIVE_TIMEOUT_SECONDS + 10, TimeUnit.SECONDS);
|
||||
.connectTimeout(KEEPALIVE_FREQUENCY_SECONDS + 10, TimeUnit.SECONDS);
|
||||
|
||||
for (Interceptor interceptor : interceptors) {
|
||||
clientBuilder.addInterceptor(interceptor);
|
||||
|
||||
Reference in New Issue
Block a user