mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-05 07:30:09 +08:00
[core] Fix highway uploading
This commit is contained in:
parent
2df0fc2e4d
commit
c685a77c68
@ -36,7 +36,7 @@ internal class ChunkedFlowSession<T>(
|
||||
withUse {
|
||||
while (true) {
|
||||
val size = runBIO { input.readAvailable(buffer) }
|
||||
if (size == -1) return
|
||||
if (size <= 0) return
|
||||
block(mapper(buffer, size, offset.getAndAdd(size.toLongUnsigned())))
|
||||
callback?.onProgression(offset.value)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user