directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Trustin Lee <trus...@gmail.com>
Subject Re: [Mina] IllegalStateException: Already released buffer
Date Tue, 29 Mar 2005 15:05:14 GMT
Hi Janne,

On Tue, 29 Mar 2005 15:55:52 +0200, Jan Andersson <janne@minq.se> wrote:
> We get exceptions with the latest version of Mina in our application:
> 
> Exception in thread "SocketIoProcessor"
> java.lang.IllegalStateException: Already released buffer.
>         at
> org.apache.mina.common.ByteBuffer.acquire(ByteBuffer.java:148)
>         at
> org.apache.mina.io.socket.SocketIoProcessor.read(SocketIoProcessor.java:
> 240)
>         at
> org.apache.mina.io.socket.SocketIoProcessor.processSessions(SocketIoProc
> essor.java:221)
>         at
> org.apache.mina.io.socket.SocketIoProcessor.access$200(SocketIoProcessor
> .java:41)
>         at
> org.apache.mina.io.socket.SocketIoProcessor$Worker.run(SocketIoProcessor
> .java:496)
> 
> I suspect that this is caused by me trying to set the receive buffer
> size
> from new default size of 1K to 8K.
> 
> What I do is that I call
> SocketSessionConfig.setSessionReceiveBufferSize(8192)
> from my IoHandler.sessionOpened() method like this:
> 
>    public void sessionOpened(IoSession ioSession)
>    {
>       SocketSessionConfig ssc = (SocketSessionConfig)
> session.getConfig();
>       ssc.setSessionReceiveBufferSize(8192);
>       ...
>    }
> 
> Obviously this isn't the right way to change the receive buffer size,
> but where/how
> would be the correct way to set this?

Oops, it was a bug.  I checked in the fix. Sorry for the inconvenience!

Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/

Mime
View raw message