Skip to content

Commit

Permalink
[KYUUBI-6790] Fix engine cannot exit when gracefully stopped
Browse files Browse the repository at this point in the history
  • Loading branch information
wForget committed Nov 5, 2024
1 parent c9d9433 commit efe7a2f
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,11 @@ abstract class ServiceDiscovery(

// stop the server genteelly
def stopGracefully(isLost: Boolean = false): Unit = {
val activeSessionCount = fe.be.sessionManager.getActiveUserSessionCount
var activeSessionCount = fe.be.sessionManager.getActiveUserSessionCount
while (activeSessionCount > 0) {
info(s"$activeSessionCount connection(s) are active, delay shutdown")
Thread.sleep(TimeUnit.SECONDS.toMillis(10))
activeSessionCount = fe.be.sessionManager.getActiveUserSessionCount
}
isServerLost.set(isLost)
gracefulShutdownLatch.countDown()
Expand Down

0 comments on commit efe7a2f

Please sign in to comment.