Allow session exit customization

This commit is contained in:
crschnick
2025-07-20 02:43:56 +00:00
parent 760db79192
commit 669e6715c8
@@ -38,16 +38,20 @@ public abstract class Session implements AutoCloseable {
ErrorEventFactory.fromThrowable(e).omit().handle();
}
try {
stop();
} catch (Exception e) {
ErrorEventFactory.fromThrowable(e).omit().handle();
}
handleSessionDeath();
});
return false;
});
}
protected void handleSessionDeath() {
try {
stop();
} catch (Exception e) {
ErrorEventFactory.fromThrowable(e).omit().handle();
}
}
public abstract boolean isRunning();
public abstract void start() throws Exception;