tomaswolf commented on issue #700: URL: https://github.com/apache/mina-sshd/issues/700#issuecomment-2732020439
Not sure. Depends on when the session is considered "closed". The current code seems to assume the session is fully closed once all the listeners on the `closeFuture` have run, and apparently there may be asynchronous things going on. So maybe an even more correct way to set this state would be ``` closeFuture.addListener(f -> state.set(State.Closed)); closeFuture.setClosed(); ``` However, `ClientSessionImpl.waitFor(...)` considers the session closed once `closeFuture.isClosed()`. So perhaps switching the order like you suggest would be a way. It's a risky change, though, since `AbstractCloseable` is used for different things, not just sessions. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org For additional commands, e-mail: dev-h...@mina.apache.org