Reduce connection timeouts from two to one minute

This commit is contained in:
Julian Raufelder 2022-02-08 14:58:49 +01:00
parent 00bc4e4e35
commit b753ec4c01
No known key found for this signature in database
GPG Key ID: 17EE71F6634E381D

View File

@ -3,9 +3,9 @@ package org.cryptomator.data.util
import java.util.concurrent.TimeUnit
enum class NetworkTimeout(val timeout: Long, val unit: TimeUnit) {
CONNECTION(2L, TimeUnit.MINUTES), //
READ(2L, TimeUnit.MINUTES), //
WRITE(2L, TimeUnit.MINUTES);
CONNECTION(1L, TimeUnit.MINUTES), //
READ(1L, TimeUnit.MINUTES), //
WRITE(1L, TimeUnit.MINUTES);
fun asMilliseconds(): Long {
return unit.toMillis(timeout)