From a55c09f8ef7386973f796e4b3309a272a1d4ed0e Mon Sep 17 00:00:00 2001 From: Abdullah Alfaraj Date: Sun, 19 Feb 2023 09:22:29 +0300 Subject: [PATCH] only end the session if it's active --- utility/session.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/utility/session.js b/utility/session.js index c203d4c..da393b0 100644 --- a/utility/session.js +++ b/utility/session.js @@ -67,6 +67,10 @@ class GenerationSession { } async endSession(garbage_collection_state) { try { + if (!g_generation_session.isActive()) { + //return if the session is not active + return null + } this.state = SessionState['Inactive'] // end the session by deactivate it this.deactivate()