mirror of
https://github.com/SpigotMC/BungeeCord.git
synced 2024-11-27 12:46:05 +01:00
parent
f070e2d064
commit
4872075bf7
@ -64,7 +64,7 @@ public class JavaZlib implements BungeeZlib
|
||||
{
|
||||
inflater.setInput( inData );
|
||||
|
||||
while ( !inflater.finished() )
|
||||
while ( !inflater.finished() && inflater.getTotalIn() < inData.length )
|
||||
{
|
||||
int count = inflater.inflate( buffer );
|
||||
out.writeBytes( buffer, 0, count );
|
||||
|
@ -44,7 +44,7 @@ public class NativeZlib implements BungeeZlib
|
||||
out.memoryAddress();
|
||||
Preconditions.checkState( ctx != 0, "Invalid pointer to compress!" );
|
||||
|
||||
while ( !nativeCompress.finished )
|
||||
while ( !nativeCompress.finished && ( compress || in.isReadable() ) )
|
||||
{
|
||||
out.ensureWritable( 8192 );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user