[ 
https://issues.apache.org/jira/browse/DIRMINA-1187?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Pavlo Polishchuk updated DIRMINA-1187:
--------------------------------------
    Description: 
 

In 88cb55397c414c6d09ce2d085ce912ab4bf45bf3 buffer cleanup was introduced to 
CumulativeProtocolDecoder#removeSessionBuffer
Before the change, the method was removing buffer from session. Now it doesn't.
{code:java}
private void removeSessionBuffer(IoSession session) {
    IoBuffer oldBuf = (IoBuffer) session.getAttribute(BUFFER);
    
    if (oldBuf != null) {
        oldBuf.free();
    }
} {code}
This leads to a problem that some output messages appear at the chain input.

The fix would be to change the code above to
{code:java}
private void removeSessionBuffer(IoSession session) {
    IoBuffer oldBuf = (IoBuffer) session.removeAttribute(BUFFER);
    
    if (oldBuf != null) {
        oldBuf.free();
    }
} {code}
 

 

  was:
 

In 88cb55397c414c6d09ce2d085ce912ab4bf45bf3 buffer cleanup was introduced to 
CumulativeProtocolDecoder#removeSessionBuffer
Before the change, the method was removing buffer from session. Now it doesn't.
{code:java}
private void removeSessionBuffer(IoSession session) {
    IoBuffer oldBuf = (IoBuffer) session.getAttribute(BUFFER);
    
    if (oldBuf != null) {
        oldBuf.free();
    }
} {code}
This leads to a problem that some output messages appear at the chain input.


The fix would be to change the code above to

 

 
{code:java}
private void removeSessionBuffer(IoSession session) {
    IoBuffer oldBuf = (IoBuffer) session.removeAttribute(BUFFER);
    
    if (oldBuf != null) {
        oldBuf.free();
    }
} {code}
 

 


> CumulativeProtocolDecoder does not remove IoBuffer from session
> ---------------------------------------------------------------
>
>                 Key: DIRMINA-1187
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-1187
>             Project: MINA
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.1.10
>            Reporter: Pavlo Polishchuk
>            Priority: Major
>
>  
> In 88cb55397c414c6d09ce2d085ce912ab4bf45bf3 buffer cleanup was introduced to 
> CumulativeProtocolDecoder#removeSessionBuffer
> Before the change, the method was removing buffer from session. Now it 
> doesn't.
> {code:java}
> private void removeSessionBuffer(IoSession session) {
>     IoBuffer oldBuf = (IoBuffer) session.getAttribute(BUFFER);
>     
>     if (oldBuf != null) {
>         oldBuf.free();
>     }
> } {code}
> This leads to a problem that some output messages appear at the chain input.
> The fix would be to change the code above to
> {code:java}
> private void removeSessionBuffer(IoSession session) {
>     IoBuffer oldBuf = (IoBuffer) session.removeAttribute(BUFFER);
>     
>     if (oldBuf != null) {
>         oldBuf.free();
>     }
> } {code}
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org
For additional commands, e-mail: dev-h...@mina.apache.org

Reply via email to