You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Emmanuel Lecharny (JIRA)" <ji...@apache.org> on 2010/11/14 17:43:14 UTC

[jira] Assigned: (DIRMINA-810) DIRMINA-803 ProtocolCodecFilter.filterWrite() is no longer thread-safe not fixed totally

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

Emmanuel Lecharny reassigned DIRMINA-810:
-----------------------------------------

    Assignee: Emmanuel Lecharny

> DIRMINA-803 ProtocolCodecFilter.filterWrite() is no longer thread-safe not fixed totally
> ----------------------------------------------------------------------------------------
>
>                 Key: DIRMINA-810
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-810
>             Project: MINA
>          Issue Type: Bug
>          Components: Filter
>    Affects Versions: 2.0.0, 2.0.1
>            Reporter: charley
>            Assignee: Emmanuel Lecharny
>            Priority: Critical
>
> Hi,I notice 	DIRMINA-803 	https://issues.apache.org/jira/browse/DIRMINA-803 sayed ProtocolEncoderOutputImpl.flush(). also has same question as ProtocolCodecFilter.filterWrite(). 
> I checked the source at  http://svn.apache.org/viewvc?view=revision&revision=1023759 
> found two places  line 427  and line 452 also has same question   
> 423   public void flush(NextFilter nextFilter, IoSession session) {
> 424  Queue<Object> messageQueue = getMessageQueue();
> 425	            
> 426	            while (!messageQueue.isEmpty()) {
> 427	                nextFilter.messageReceived(session, messageQueue.poll());
> 428	            }
> from 426 may should as follows
>   while (!messageQueue.isEmpty()) {
>                   Object encodedMessage = messageQueue.poll();              
>                 if (encodedMessage == null) {
> 	                    break;
> 	                }
>                 nextFilter.messageReceived(session, encodedMessage.poll());          
>   }
> and
> 451	            while (!bufferQueue.isEmpty()) {
> 452	                Object encodedMessage = bufferQueue.poll();
> 453	
> 454	                // Flush only when the buffer has remaining.
> 455	                if (!(encodedMessage instanceof IoBuffer) || ((IoBuffer) encodedMessage).hasRemaining()) {
> at line 453 should insert 
>  if (encodedMessage == null) {
>                     break;	                }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.