mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2024-12-14 12:10:30 +00:00
Fix large file uploads producing oversized packets.
- Fixes #1026 - The remaining bytes counter wasn't being decremented, so the code that splits off smaller packets was unreachable. Thus all file slices were being put into a single UploadFileMessage packet.
This commit is contained in:
parent
cdf8b77ffd
commit
60d1d1bb18
@ -160,6 +160,7 @@ public class UploadFileMessage extends ComputerServerMessage
|
|||||||
contents.position( currentOffset ).limit( currentOffset + canWrite );
|
contents.position( currentOffset ).limit( currentOffset + canWrite );
|
||||||
slices.add( new FileSlice( fileId, currentOffset, contents.slice() ) );
|
slices.add( new FileSlice( fileId, currentOffset, contents.slice() ) );
|
||||||
currentOffset += canWrite;
|
currentOffset += canWrite;
|
||||||
|
remaining -= canWrite;
|
||||||
}
|
}
|
||||||
|
|
||||||
contents.position( 0 ).limit( capacity );
|
contents.position( 0 ).limit( capacity );
|
||||||
|
Loading…
Reference in New Issue
Block a user