mirror of
				https://github.com/SquidDev-CC/CC-Tweaked
				synced 2025-10-31 13:42:59 +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:
		| @@ -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 ); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Toad-Dev
					Toad-Dev