Skip to content

合约调用后目前没法做到BcosSDK优雅退出 #750

Open
@599019643

Description

@599019643

SDK版本:2.9.0
问题描述:合约加载并调用后,使用BcosSDK的stopAll方法没法实现优雅退出。

image

该线程来自于合约创建时Contract构建器中EventSubscribe变量生成的线程池;

目前暂时用下述方式实现优雅退出:
Field field = Contract.class.getDeclaredField("eventSubscribe");
field.setAccessible(true);
EventSubscribe eventSubscribe = (EventSubscribe) field.get(合约对象);
eventSubscribe.stop();

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingv2.9.0

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions