Skip to content

Commit 9c132e9

Browse files
committed
[jsscripting] Close GraalJSScriptEngine when closing OpenhabGraalJSScriptEngine
Fixes openhab#18224. Signed-off-by: Florian Hotze <[email protected]>
1 parent fc607c3 commit 9c132e9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

bundles/org.openhab.automation.jsscripting/src/main/java/org/openhab/automation/jsscripting/internal/OpenhabGraalJSScriptEngine.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -314,8 +314,10 @@ protected Exception afterThrowsInvocation(Exception e) {
314314
}
315315

316316
@Override
317-
public void close() {
317+
public void close() throws Exception {
318318
jsRuntimeFeatures.close();
319+
// we must not close the engine before closing the runtime features, otherwise the runtime features cannot be closed properly
320+
super.close();
319321
}
320322

321323
/**

0 commit comments

Comments
 (0)