fix too RejectedExecutionException of ServiceServer.executor

This commit is contained in:
CaiHQ
2022-07-14 22:23:31 +08:00
parent e336865cc1
commit 0aac9d16d9
3 changed files with 26 additions and 5 deletions

View File

@@ -53,9 +53,10 @@ public class ComponedContractResult {
return;
}
} catch (Exception e) {
String str = null;
cr2 =
new ContractResult(
ContractResult.Status.Error, new JsonPrimitive("parse str failed:"));
ContractResult.Status.Error, new JsonPrimitive("parse str failed:" + obj.toString()));
e.printStackTrace();
}
// if (cr2.status == ContractResult.Status.Error) { // 结果不是Success不参与最终结果计算

View File

@@ -25,7 +25,7 @@ public class ServiceServer extends Thread {
public static final ExecutorService executor =
new ThreadPoolExecutor(
8,
15,
Integer.MAX_VALUE,
60,
TimeUnit.SECONDS,
new SynchronousQueue<>());