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

DummySession.close(true) not notifying close listener

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.0.0-M4
    • 2.0.0-M5
    • Core
    • None
    • All?

    Description

      I'm trying to add a close listener onto a session, and perform some processing after the session close is completed.

      This works fine on a live system (i.e., when using a NioSocketSession), but when I unit test using a DummySession I never get notified about operationComplete.

      See example JUnit test case at:

      http://www.darose.net/TestDummyIoSession.java


      Additional analysis, as per Emmanuel Lécharny :

      I think that the listeners are never called in the awaitUninterruptibly() method :

      /**

      • {@inheritDoc}

        */
        public IoFuture awaitUninterruptibly() {
        try

        { await0(Long.MAX_VALUE, false); }

        catch ( InterruptedException ie)

        { // Do nothing : this catch is just mandatory by contract }

        ...

      The doc is explicit here :
      /**

      • Wait for the asynchronous operation to complete uninterruptibly.
      • *The attached listeners will be notified when the operation is
      • completed.*
        *
      • @return the current IoFuture
        */
        IoFuture awaitUninterruptibly();

      The listeners are never called...

      Attachments

        Activity

          People

            elecharny Emmanuel Lécharny
            darose David Rosenstrauch
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: