Skip to content

Commit

Permalink
revise sessionShutdown/Main.java
Browse files Browse the repository at this point in the history
  • Loading branch information
t-horikawa committed Jun 11, 2024
1 parent 0cf7aec commit 71873b0
Showing 1 changed file with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,16 @@ public static void shutdown(Session session) throws IOException, ServerException
} finally {
System.out.println("---- finish shutdown, which takes " + (System.currentTimeMillis() - start) + " milli sec ----");
}
System.out.println("session.isAlive() = " + session.isAlive());
} else {
while (session.isAlive()) {
System.out.println("session is still alive");
Thread.sleep(2000);
}
Thread.sleep(100);
}
boolean detectAlive = false;
while (session.isAlive()) {
System.out.println("session is still alive");
Thread.sleep(100);
detectAlive = true;
}
if (detectAlive) {
System.out.println("session status has changed from alive to shutdown");
}
}
}

0 comments on commit 71873b0

Please sign in to comment.