File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
src/main/kotlin/com/hyperdevs/poeditor/gradle Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2424### Added
2525- No new features!
2626### Changed
27- - No changed features!
27+ - Increase connect, read and write timeouts to 30 seconds
2828### Deprecated
2929- No deprecated features!
3030### Removed
Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ import okhttp3.logging.HttpLoggingInterceptor
3434import retrofit2.Retrofit
3535import retrofit2.converter.moshi.MoshiConverterFactory
3636import java.util.*
37+ import java.util.concurrent.TimeUnit
3738
3839/* *
3940 * Main class that does the XML download, parsing and saving from PoEditor files.
@@ -46,7 +47,13 @@ object PoEditorStringsImporter {
4647 .add(Date ::class .java, DateJsonAdapter ())
4748 .build()
4849
50+ private const val CONNECT_TIMEOUT_SECONDS = 30L
51+ private const val READ_TIMEOUT_SECONDS = 30L
52+ private const val WRITE_TIMEOUT_SECONDS = 30L
4953 private val okHttpClient = OkHttpClient .Builder ()
54+ .connectTimeout(CONNECT_TIMEOUT_SECONDS , TimeUnit .SECONDS )
55+ .readTimeout(READ_TIMEOUT_SECONDS , TimeUnit .SECONDS )
56+ .writeTimeout(WRITE_TIMEOUT_SECONDS , TimeUnit .SECONDS )
5057 .addInterceptor(HttpLoggingInterceptor (object : HttpLoggingInterceptor .Logger {
5158 override fun log (message : String ) {
5259 logger.debug(message)
You can’t perform that action at this time.
0 commit comments