mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2025-09-06 00:29:39 +00:00
RequestsExecutor now is Closeable
This commit is contained in:
@@ -83,4 +83,8 @@ class KtorRequestsExecutor(
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun close() {
|
||||
client.close()
|
||||
}
|
||||
}
|
||||
|
@@ -2,8 +2,9 @@ package com.github.insanusmokrassar.TelegramBotAPI.bot
|
||||
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.bot.exceptions.RequestException
|
||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.Request
|
||||
import kotlinx.io.core.Closeable
|
||||
|
||||
interface RequestsExecutor {
|
||||
interface RequestsExecutor : Closeable {
|
||||
@Throws(RequestException::class)
|
||||
suspend fun <T : Any> execute(request: Request<T>): T
|
||||
}
|
Reference in New Issue
Block a user