mirror of
https://github.com/rebelonion/Dantotsu.git
synced 2026-01-29 20:41:01 +00:00
fix: network safety
This commit is contained in:
@@ -40,7 +40,12 @@ class MangaUpdates {
|
||||
e.printStackTrace()
|
||||
}
|
||||
}
|
||||
val res = client.post(apiUrl, json = query).parsed<MangaUpdatesResponse>()
|
||||
val res = try {
|
||||
client.post(apiUrl, json = query).parsed<MangaUpdatesResponse>()
|
||||
} catch (e: Exception) {
|
||||
Logger.log(e.toString())
|
||||
return@tryWithSuspend null
|
||||
}
|
||||
coroutineScope {
|
||||
res.results?.map {
|
||||
async(Dispatchers.IO) {
|
||||
|
||||
Reference in New Issue
Block a user