Revert server list ping changes

They are broken with ping passthrough.
This commit is contained in:
Andrew Steinborn
2020-10-06 11:05:36 -04:00
parent 706fea8a3c
commit 5072e1085a
9 changed files with 37 additions and 214 deletions

View File

@@ -63,23 +63,6 @@ public class LibdeflateVelocityCompressor implements VelocityCompressor {
}
}
@Override
public boolean deflateSingle(ByteBuf source, ByteBuf destination) throws DataFormatException {
ensureNotDisposed();
long sourceAddress = source.memoryAddress() + source.readerIndex();
long destinationAddress = destination.memoryAddress() + destination.writerIndex();
int produced = deflate.process(deflateCtx, sourceAddress, source.readableBytes(),
destinationAddress, destination.writableBytes());
if (produced > 0) {
destination.writerIndex(destination.writerIndex() + produced);
return true;
}
return false;
}
private void ensureNotDisposed() {
Preconditions.checkState(!disposed, "Object already disposed");
}

View File

@@ -14,9 +14,4 @@ public interface VelocityCompressor extends Disposable, Native {
throws DataFormatException;
void deflate(ByteBuf source, ByteBuf destination) throws DataFormatException;
default boolean deflateSingle(ByteBuf source, ByteBuf destination) throws DataFormatException {
deflate(source, destination);
return true;
}
}