mirror of
https://github.com/Shabinder/SpotiFlyer.git
synced 2024-11-22 17:14:32 +01:00
Logging and Request Timeout Removed
This commit is contained in:
parent
54e1221eb8
commit
8f7bc00801
@ -89,7 +89,7 @@ fun createHttpClient(enableNetworkLogs: Boolean = false) = HttpClient {
|
|||||||
}*/
|
}*/
|
||||||
// Timeout
|
// Timeout
|
||||||
install(HttpTimeout) {
|
install(HttpTimeout) {
|
||||||
requestTimeoutMillis = 15000L
|
// requestTimeoutMillis = 20000L
|
||||||
connectTimeoutMillis = 15000L
|
connectTimeoutMillis = 15000L
|
||||||
socketTimeoutMillis = 15000L
|
socketTimeoutMillis = 15000L
|
||||||
}
|
}
|
||||||
|
@ -72,6 +72,7 @@ suspend fun downloadFile(url: String): Flow<DownloadResult> {
|
|||||||
}
|
}
|
||||||
client.close()
|
client.close()
|
||||||
} catch (e:Exception) {
|
} catch (e:Exception) {
|
||||||
|
e.printStackTrace()
|
||||||
emit(DownloadResult.Error(e.message ?: "File not downloaded"))
|
emit(DownloadResult.Error(e.message ?: "File not downloaded"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user