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