mirror of
https://github.com/PaperMC/Velocity.git
synced 2025-03-31 16:30:30 +08:00
Fix fallback compression handler
This commit is contained in:
parent
c0fdf20224
commit
71feb11b2e
@ -57,7 +57,8 @@ public class JavaVelocityCompressor implements VelocityCompressor {
|
||||
inflater.setInput(source.nioBuffer());
|
||||
|
||||
try {
|
||||
while (!inflater.finished() && inflater.getBytesWritten() < uncompressedSize) {
|
||||
final int readable = source.readableBytes();
|
||||
while (!inflater.finished() && inflater.getBytesRead() < readable) {
|
||||
if (!destination.isWritable()) {
|
||||
destination.ensureWritable(ZLIB_BUFFER_SIZE);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user