Uploaded image for project: 'MINA'
  1. MINA
  2. DIRMINA-135

exception during a connector.connect() aren't caught by filters

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Duplicate
    • 0.8.0, 0.8.1, 0.8.2
    • 0.9.0
    • None
    • None
    • MINA 0.8 and a SocketConnector

    Description

      I try to do a reconnection filter, automaticly connecting and reconnecting a connector until it works.
      if theinitial connector.connect(...) fail, and exception is thrown, but it's not caught by IoFilter chain. It's not really a bug I think but I added a simple fix :

      in SocketConnector class in the connect method :
      public IoSession connect( SocketAddress address, SocketAddress localAddress,

      int timeout, IoHandler handler ) throws IOException

      I changed :

      ....
      if( request.exception != null )

      { ExceptionUtil.throwException( request.exception ); }

      ....

      into
      ....
      if( request.exception != null )

      { filters.exceptionCaught(null,request.exception ); ExceptionUtil.throwException( request.exception ); }

      ....

      and now my filters get the exception normaly, perhaps it's an idea to add it to MINA 0.8 ?

      Attachments

        Activity

          People

            trustin Trustin Lee
            vrm Julien Vermillard
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: