Uploaded image for project: 'JBoss Remoting (3+)'
  1. JBoss Remoting (3+)
  2. REM3-121

CloseHandlers are not called when the remote connection closes

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 3.2.0.Beta2
    • None
    • None

      THis is for 3.2.0 which does not appear in the version list

      Adding the following to org.jboss.remoting3.test.ChannelTestBase.java, the close handler does not get called. We discussed on IRC a few days ago but no matter what I do to close the channel this does not get called. Please provide a working example

          @Test
          public void testRemoteChannelClose() throws Exception {
              final CountDownLatch closedLatch = new CountDownLatch(1);
              sendChannel.addCloseHandler(new CloseHandler<Channel>() {
      
                  @Override
                  public void handleClose(Channel closed) {
                      closedLatch.countDown();
                  }
              });
              
              recvChannel.writeShutdown();
              IoUtils.safeClose(recvChannel);
              System.out.println("Waiting for closed");
              closedLatch.await();
              System.out.println("Closed");
          }
      

              dlloyd@redhat.com David Lloyd
              kkhan1@redhat.com Kabir Khan
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: