Mercurial Hosting > luan
diff src/org/eclipse/jetty/io/nio/SslConnection.java @ 1065:158d1e6ac17f
fix JBuffer.compact()
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Wed, 09 Nov 2016 04:36:05 -0700 |
parents | 4a50422596b6 |
children | 9d357b9e4bcb |
line wrap: on
line diff
--- a/src/org/eclipse/jetty/io/nio/SslConnection.java Wed Nov 09 03:09:37 2016 -0700 +++ b/src/org/eclipse/jetty/io/nio/SslConnection.java Wed Nov 09 04:36:05 2016 -0700 @@ -123,7 +123,7 @@ _buffers=__buffers.get(); if (_buffers==null) _buffers=new SslBuffers(_session.getPacketBufferSize()*2,_session.getApplicationBufferSize()*2); - _inbound=_buffers._in; + _inbound = _buffers._in; _outbound = _buffers._out; _unwrapBuf=_buffers._unwrap; __buffers.set(null); @@ -221,7 +221,7 @@ if (toFill==null) { // use the unwrapbuffer to hold received data. - _unwrapBuf.compact(); + BufferUtil.compact(_unwrapBuf); toFill=_unwrapBuf; } // Else if the fill buffer is too small for the SSL session @@ -383,7 +383,7 @@ synchronized(bbuf) { - _outbound.compact(); + BufferUtil.compact(_outbound); ByteBuffer out_buffer = _outbound.getByteBuffer().duplicate(); synchronized(out_buffer) { @@ -465,7 +465,7 @@ result.bytesConsumed(), result.bytesProduced()); - _inbound.compact(); + BufferUtil.compact(_inbound); buffer.limit(buffer.limit()+result.bytesProduced()); } catch(SSLException e) @@ -481,7 +481,7 @@ { case BUFFER_UNDERFLOW: if (_endp.isInputShutdown()) - _inbound.clear(); + _inbound.limit(0); break; case BUFFER_OVERFLOW: