2

I've an IoSession, and when I call close() on it, it is still connected.

The code:

restSession.close(true).awaitUninterruptibly(5000); //Stuck here, timeout is ignored
connector.dispose();    //Never happens :(

Some other version:

restSession.close(true);
while (restSession.isConnected()) {
    System.out.println("REST is still connected!"); //Keeps spamming
    try {
        Thread.sleep(1000);
    } catch (final InterruptedException e) {
        e.printStackTrace();
    }
}
connector.dispose();    //Never happens :(

Any idea why is this happening and how to solve it? Shouldn't close(true) just close it no matter what?

Pitel
  • 5,334
  • 7
  • 45
  • 72

0 Answers0