|
|
@@ -27,7 +27,7 @@ class StandardSession constructor(
|
|
|
override val manager: SessionManager,
|
|
|
) : AbstractSession() {
|
|
|
private val supervisorJob = SupervisorJob()
|
|
|
- override val coroutineContext: CoroutineContext = supervisorJob
|
|
|
+ override val coroutineContext: CoroutineContext = supervisorJob + CoroutineName("session-$key")
|
|
|
private val lifeCounter = atomic(0)
|
|
|
|
|
|
private lateinit var _bot: Bot
|
|
|
@@ -127,7 +127,7 @@ class ListenableSessionWrapper(val session: Session) : Session by session {
|
|
|
check(isAuthed) { "Session is not authed" }
|
|
|
|
|
|
val handler = botEventHandler ?: getExtElement(Key.botEventHandler)
|
|
|
- val element = bot.eventChannel.subscribeAlways<BotEvent> { event ->
|
|
|
+ val element = bot.eventChannel.subscribeAlways(BotEvent::class, coroutineContext) { event ->
|
|
|
handler?.invoke(session, event)
|
|
|
}
|
|
|
|