You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by beharder <ss...@126.com> on 2007/11/16 16:38:32 UTC
Is it a bug about the read method of SocketIoProcessor?
Hi all,
In the read method of class SocketIoProcessor:
try {
......
if (readBytes > 0) {
session.getFilterChain().fireMessageReceived(session, buf);
buf = null;
} catch (Throwable e) {
....
} finally {
if (buf != null)
buf.release();
}
In abvoe codes, why the var buf is set to null after notifying all filters?
The buf.release() can't be called if buf is set to null, that means the buf
cann't be put into the buffer pool managed by calss
PooledByteBufferAllocator.
It also leads to the buffer can't be reuse.
Is it a bug, or something behind it I don't know?
Thanks & best regards,
beharder
--
View this message in context: http://www.nabble.com/Is-it-a-bug-about-the-read-method-of-SocketIoProcessor--tf4822026s16868.html#a13795479
Sent from the Apache MINA Support Forum mailing list archive at Nabble.com.