fix deprecations

This commit is contained in:
InsanusMokrassar 2021-05-26 22:16:08 +06:00
parent c800a81a41
commit 0ed1a8702b
3 changed files with 5 additions and 5 deletions

View File

@ -158,7 +158,7 @@ data class SauceNaoAPI(
minSimilarity: Float? = null
): SauceNaoAnswer? {
return suspendCoroutine<SauceNaoAnswer> {
requestsChannel.offer(
requestsChannel.trySend(
it to HttpRequestBuilder().apply {
url(searchUrl)
@ -212,4 +212,4 @@ data class SauceNaoAPI(
timeManager.close()
quotaManager.close()
}
}
}

View File

@ -92,7 +92,7 @@ internal class RequestQuotaManager (
quotaActions.send(callback)
}
}
quotaActions.offer(callback)
quotaActions.trySend(callback)
}
}

View File

@ -84,7 +84,7 @@ internal class TimeManager(
suspend fun getMostOldestInLongPeriod(): DateTime? {
return suspendCoroutine {
actionsChannel.offer(
actionsChannel.trySend(
TimeManagerMostOldestInLongGetter(it)
)
}
@ -92,7 +92,7 @@ internal class TimeManager(
suspend fun getMostOldestInShortPeriod(): DateTime? {
return suspendCoroutine {
actionsChannel.offer(TimeManagerMostOldestInShortGetter(it))
actionsChannel.trySend(TimeManagerMostOldestInShortGetter(it))
}
}