Skip to content

Commit

Permalink
fix entity service lifecycle
Browse files Browse the repository at this point in the history
  • Loading branch information
burdoto committed May 21, 2024
1 parent ce7b678 commit 69ddb4f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/org/comroid/api/tree/Terminatable.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@

public interface Terminatable {
default void terminate() throws Throwable {
if (this instanceof AutoCloseable ac)
ac.close();
}
}

0 comments on commit 69ddb4f

Please sign in to comment.