mytang0 commented on code in PR #1037:
URL:
https://github.com/apache/incubator-eventmesh/pull/1037#discussion_r931933145
##########
eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/tcp/client/group/ClientSessionGroupMapping.java:
##########
@@ -133,11 +133,11 @@ public void operationComplete(ChannelFuture future)
throws Exception {
return;
}
- closeSession(session);
-
//remove session from sessionTable
sessionTable.remove(addr);
+ closeSession(session);
+
Review Comment:
> When the client reconnects, the port will change, and the session is
identified by ip and port. EventMesh acquires session as follows:
>
> ```
> public Session getSession(ChannelHandlerContext ctx) {
> Session session = getSession((InetSocketAddress)
ctx.channel().remoteAddress());
> return session;
> }
>
> public Session getSession(InetSocketAddress address) {
> return sessionTable.get(address);
> }
> ```
Yes. If there is a problem of port reuse, is it better to adjust this way?
--
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]