From 149ecf175bf39bdeae215df9260df1988f320044 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Tue, 10 Aug 2021 11:29:46 +0600 Subject: [PATCH] small improvement of DownloadFileChannelRequestCallFactory --- .../bot/Ktor/base/DownloadFileChannelRequestCallFactory.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/bot/Ktor/base/DownloadFileChannelRequestCallFactory.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/bot/Ktor/base/DownloadFileChannelRequestCallFactory.kt index 252b228dcf..eba7e7d4a1 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/bot/Ktor/base/DownloadFileChannelRequestCallFactory.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/bot/Ktor/base/DownloadFileChannelRequestCallFactory.kt @@ -23,7 +23,7 @@ object DownloadFileChannelRequestCallFactory : KtorCallFactory { ): T? = (request as? DownloadFileStream) ?.let { val fullUrl = urlsKeeper.createFileLinkUrl(it.filePath) - return ByteReadChannelAllocator { + ByteReadChannelAllocator { val scope = CoroutineScope(coroutineContext) val outChannel = ByteChannel() scope.launch {