Logging and Request Timeout Removed

This commit is contained in:
shabinder 2021-05-09 12:01:08 +05:30
parent 54e1221eb8
commit 8f7bc00801
2 changed files with 2 additions and 1 deletions

View File

@ -89,7 +89,7 @@ fun createHttpClient(enableNetworkLogs: Boolean = false) = HttpClient {
}*/
// Timeout
install(HttpTimeout) {
requestTimeoutMillis = 15000L
// requestTimeoutMillis = 20000L
connectTimeoutMillis = 15000L
socketTimeoutMillis = 15000L
}

View File

@ -72,6 +72,7 @@ suspend fun downloadFile(url: String): Flow<DownloadResult> {
}
client.close()
} catch (e:Exception) {
e.printStackTrace()
emit(DownloadResult.Error(e.message ?: "File not downloaded"))
}
}