Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

调用client的destroy方法,无法彻底销毁client #772

Open
JyFangYang opened this issue Apr 24, 2023 · 3 comments
Open

调用client的destroy方法,无法彻底销毁client #772

JyFangYang opened this issue Apr 24, 2023 · 3 comments
Assignees
Labels
bug Something isn't working resolved The issue has been resolved v3.4.0

Comments

@JyFangYang
Copy link

java-sdk:3.2.0、3.3.0版本(其他版本未实验)

现象:
在main方法中初始化client完成后,然后调用client的destroy方法,JVM并不能退出;

代码示例如下:
public static void main(String[] args){
BcosSDK sdk = BcosSDK.build(configFile);
Client client = sdk.getClient("group0");
client.destroy();
}
此时main方法无法结束,发现有线程在running中;

@JyFangYang
Copy link
Author

查看cpp日志,发现client.destroy()后,仍在不停打印:[SDK][WS][STAT]connected nodes,count=1;;

image

@kyonRay
Copy link
Member

kyonRay commented Apr 24, 2023

感谢提出issue,应该是cpp sdk没有析构,我们会持续跟进这个问题。

@kyonRay kyonRay added bug Something isn't working v3.4.0 labels May 10, 2023
@Hopshine
Copy link

此问题是在jni层中线程attach之后没有正常detach导致的,对应修改位于关联的FISCO-BCOS/bcos-c-sdk项目中

Hopshine pushed a commit to Hopshine/bcos-c-sdk that referenced this issue May 24, 2023
@kyonRay kyonRay added the resolved The issue has been resolved label Jul 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working resolved The issue has been resolved v3.4.0
Projects
None yet
Development

No branches or pull requests

4 participants