[ 
https://issues.apache.org/jira/browse/DIRMINA-1048?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15561770#comment-15561770
 ] 

eli_user commented on DIRMINA-1048:
-----------------------------------

Hi,

I have patched  AbstractPollingIoProcessor so that it throws Exception and I 
have seen that exception has been correctly propagated to IoHandler 
implementation.

So my question is: Is it possible that an override of this kind:

        public void exceptionCaught(IoSession session, Throwable cause) {
                session.close();
        }
where i use deprecated close() instead of closeNow() in the case of full 
transmission queue, don't close the session?

    /**
     * Closes this session after all queued write requests
     * are flushed. This operation is asynchronous.  Wait for the returned
     * {@link CloseFuture} if you want to wait for the session actually closed.
     * @deprecated use {@link #close(boolean)}
     * 
     * @return The associated CloseFuture
     */
    @Deprecated
    CloseFuture close();


Thanks

> IoSession doesn't go to corrected state
> ---------------------------------------
>
>                 Key: DIRMINA-1048
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-1048
>             Project: MINA
>          Issue Type: Bug
>    Affects Versions: 2.0.13
>         Environment: windows 7
>            Reporter: eli_user
>            Priority: Critical
>
> In my implementation of IoFilter i don't make override of
> @Override
> public void exceptionCaught(NextFilter nextFilter, IoSession session, 
> Throwable cause) throws Exception {
> }
> After following stacktrace, IoSession doesn't notified on error occured
> java.io.IOException: An established connection was aborted by the software in 
> your host machine
>         at sun.nio.ch.SocketDispatcher.read0(Native Method)
>         at sun.nio.ch.SocketDispatcher.read(Unknown Source)
>         at sun.nio.ch.IOUtil.readIntoNativeBuffer(Unknown Source)
>         at sun.nio.ch.IOUtil.read(Unknown Source)
>         at sun.nio.ch.SocketChannelImpl.read(Unknown Source)
>         at 
> org.apache.mina.transport.socket.nio.NioProcessor.read(NioProcessor.java:312)
>         at 
> org.apache.mina.transport.socket.nio.NioProcessor.read(NioProcessor.java:45)
>         at 
> org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:677)
>         at 
> org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:651)
>         at 
> org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:640)
>         at 
> org.apache.mina.core.polling.AbstractPollingIoProcessor.access$600(AbstractPollingIoProcessor.java:68)
>         at 
> org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:1097)
>         at 
> org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown 
> Source)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
>         at java.lang.Thread.run(Unknown Source)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to