eventmesh icon indicating copy to clipboard operation
eventmesh copied to clipboard

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

Open Bannirui opened this issue 2 years ago • 4 comments

Search before asking

  • [X] 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 avatar Feb 17 '23 15:02 Bannirui

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

github-actions[bot] avatar Feb 17 '23 15:02 github-actions[bot]

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[bot] avatar Apr 22 '24 18:04 github-actions[bot]

@Bannirui Did the change in https://github.com/apache/eventmesh/issues/4855 help resolve this issue?

Pil0tXia avatar Apr 24 '24 11:04 Pil0tXia

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[bot] avatar Jul 23 '24 18:07 github-actions[bot]