Skip to content

Commit 30a33bf

Browse files
committed
fix CobolResolve.java
1 parent 31a4068 commit 30a33bf

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

libcobj/app/src/main/java/jp/osscons/opensourcecobol/libcobj/call/CobolResolve.java

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -549,15 +549,6 @@ private static void cancelCallStackList(CobolCallStackList p) {
549549
return;
550550
}
551551

552-
// プログラムをキャンセル
553-
String programName = p.getName();
554-
if (programName != null) {
555-
CobolRunnable runnable = callTable.get(programName);
556-
if (runnable != null && !runnable.isActive()) {
557-
runnable.cancel();
558-
}
559-
}
560-
561552
// 子プログラムを再帰的にキャンセル
562553
if (p.getChildren() != null) {
563554
cancelCallStackList(p.getChildren());
@@ -569,6 +560,13 @@ private static void cancelCallStackList(CobolCallStackList p) {
569560
cancelCallStackList(p.getSister());
570561
p.setSister(null);
571562
}
563+
564+
// 自分自身をキャンセル
565+
try {
566+
cobCancel(p.getName());
567+
} catch (CobolStopRunException e) {
568+
e.printStackTrace();
569+
}
572570
}
573571

574572
/**

0 commit comments

Comments
 (0)