From babc21198c2ae1686522bd03c2a83b1182ec3834 Mon Sep 17 00:00:00 2001 From: Him188 Date: Sun, 23 Feb 2020 19:31:26 +0800 Subject: [PATCH] Add timeout --- .../network/protocol/packet/chat/receive/MessageSvc.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/packet/chat/receive/MessageSvc.kt b/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/packet/chat/receive/MessageSvc.kt index b2dab4e51..7207413db 100644 --- a/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/packet/chat/receive/MessageSvc.kt +++ b/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/packet/chat/receive/MessageSvc.kt @@ -285,7 +285,7 @@ internal class MessageSvc { @UseExperimental(MiraiExperimentalAPI::class) fun startWaitingSequenceId(contact: Contact) { - sequenceIdDeferred = contact.subscribingGetAsync { + sequenceIdDeferred = contact.subscribingGetAsync(timeoutMillis = 3000) { if (it.messageRandom == this@MessageSourceFromSend.messageRandom) { it.sequenceId } else null