Skip to content

Commit 38fb9e9

Browse files
committed
fix actframework#667 - make Act.shutdown(App) running in an new Thread to avoid InterruptedException
1 parent e990052 commit 38fb9e9

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

src/main/java/act/Act.java

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -330,14 +330,19 @@ public static void startup(AppDescriptor descriptor) {
330330
}
331331
}
332332

333-
public static void shutdown(App app) {
333+
public static void shutdown(final App app) {
334334
if (null == appManager) {
335335
return;
336336
}
337-
if (!appManager.unload(app)) {
338-
app.destroy();
339-
}
340-
shutdownAct();
337+
new Thread() {
338+
@Override
339+
public void run() {
340+
if (!appManager.unload(app)) {
341+
app.destroy();
342+
}
343+
shutdownAct();
344+
}
345+
}.start();
341346
}
342347

343348
public static RequestServerRestart requestRestart() {

0 commit comments

Comments
 (0)