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

[Enhancement] Socket Channel may be null if error or crash during client-side connecting #3191

Open
1 of 2 tasks
Bannirui opened this issue Feb 17, 2023 · 3 comments
Open
1 of 2 tasks
Labels
enhancement New feature or request

Comments

@Bannirui
Copy link
Contributor

Search before asking

  • I had searched in the issues and found no similar issues.

Enhancement Request

Locating at: org/apache/eventmesh/client/tcp/common/TcpClient.java
Line: 118

the implementation of close()

try{
    channel.disconnect().sync();
    // ...
} catch {
    // ...
}

close() would be called

  • call func explicitly
  • call func in finally block for resource safety
  • deffer implicitly caz try()

socket will fail if the error or crash is on bind(), channel reference will be Null

Describe the solution you'd like

Removing channel.disconnect().sync(); , resources will be closed with the determination of EventLoopGroup

Are you willing to submit PR?

  • Yes I am willing to submit a PR!
@Bannirui Bannirui added the enhancement New feature or request label Feb 17, 2023
@github-actions
Copy link
Contributor

Welcome to the Apache EventMesh (incubating) community!!
We are glad that you are contributing by opening this issue. :D

Please make sure to include all the relevant context.
We will be here shortly.

If you are interested in contributing to our project, please let us know!
You can check out our contributing guide on contributing to EventMesh.

Want to get closer to the community?

WeChat Group:
wechat_qr

Mailing Lists:

Name Description Subscribe Unsubscribe Archive
Users User support and questions mailing list Subscribe Unsubscribe Mail Archives
Development Development related discussions Subscribe Unsubscribe Mail Archives
Commits All commits to repositories Subscribe Unsubscribe Mail Archives

Copy link
Contributor

It has been 90 days since the last activity on this issue. Apache EventMesh values the voices of the community. Please don't hesitate to share your latest insights on this matter at any time, as the community is more than willing to engage in discussions regarding the development and optimization directions of this feature.

If you feel that your issue has been resolved, please feel free to close it. Should you have any additional information to share, you are welcome to reopen this issue.

@github-actions github-actions bot added the Stale label Apr 22, 2024
@Pil0tXia
Copy link
Member

@Bannirui Did the change in #4855 help resolve this issue?

@github-actions github-actions bot removed the Stale label Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants