mirror of
https://github.com/mamoe/mirai.git
synced 2025-03-11 21:30:11 +08:00
[core/common] Process packet body in launched coroutines, instead of suspending the processing queue. part of #2160.
This commit is contained in:
parent
9dd57de844
commit
e6bef9ce1e
@ -121,7 +121,7 @@ internal abstract class CommonNetworkHandler<Conn>(
|
||||
result.getOrNull()?.let { packet ->
|
||||
try {
|
||||
val decoded = decodePacket(packet)
|
||||
processBody(decoded)
|
||||
launch(start = CoroutineStart.UNDISPATCHED) { processBody(decoded) }
|
||||
} catch (e: Throwable) {
|
||||
if (e is CancellationException) return@launch
|
||||
handleExceptionInDecoding(e)
|
||||
|
Loading…
Reference in New Issue
Block a user