mirror of
https://github.com/xpipe-io/xpipe.git
synced 2026-05-03 19:30:31 +00:00
Allow session exit customization
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user