only end the session if it's active

heal-brush
Abdullah Alfaraj 2023-02-19 09:22:29 +03:00
parent 8569f70554
commit a55c09f8ef
1 changed files with 4 additions and 0 deletions

View File

@ -67,6 +67,10 @@ class GenerationSession {
} }
async endSession(garbage_collection_state) { async endSession(garbage_collection_state) {
try { 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.state = SessionState['Inactive'] // end the session by deactivate it
this.deactivate() this.deactivate()