diff --git a/src/dorkbox/network/connection/ConnectionImpl.java b/src/dorkbox/network/connection/ConnectionImpl.java index 64ea0206..22f629e8 100644 --- a/src/dorkbox/network/connection/ConnectionImpl.java +++ b/src/dorkbox/network/connection/ConnectionImpl.java @@ -610,7 +610,7 @@ class ConnectionImpl extends ChannelInboundHandlerAdapter implements Connection_ } } - this.logger.info("Closed remote {} connection [{}]", + this.logger.info("Closed {} connection [{}]", type, EndPoint.getHostDetails(channel.remoteAddress())); } diff --git a/src/dorkbox/network/connection/KryoExtra.java b/src/dorkbox/network/connection/KryoExtra.java index 1be2668c..f5d87eca 100644 --- a/src/dorkbox/network/connection/KryoExtra.java +++ b/src/dorkbox/network/connection/KryoExtra.java @@ -146,7 +146,8 @@ class KryoExtra extends Kryo { // read the object from the buffer. readerBuff.setBuffer(buffer); - return readClassAndObject(readerBuff); // this properly sets the readerIndex, but only if it's the correct buffer + // this properly sets the readerIndex, but only if it's the correct buffer + return readClassAndObject(readerBuff); } //////////////// @@ -467,16 +468,6 @@ class KryoExtra extends Kryo { return read(connection, reader); } - - @Override - protected - void finalize() throws Throwable { - readerBuff.getByteBuf().release(); - writerBuff.getByteBuf().release(); - - super.finalize(); - } - public NetworkSerializationManager getSerializationManager() { return serializationManager;