Bannirui opened a new issue, #3191:
URL: https://github.com/apache/incubator-eventmesh/issues/3191

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/eventmesh/issues?q=is%3Aissue) and found no 
similar issues.
   
   
   ### Enhancement Request
   
   Locating at: org/apache/eventmesh/client/tcp/common/TcpClient.java
   Line: 118
   
   the implementation of `close()`
   
   ```java
   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!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to