You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@eventmesh.apache.org by jo...@apache.org on 2022/12/29 04:02:48 UTC

[incubator-eventmesh] branch master updated: resolved redundant call[IPUtils.getLocalAddress()] in SubscribeProcessor eventmesh-runtime (#2701)

This is an automated email from the ASF dual-hosted git repository.

jonyang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-eventmesh.git


The following commit(s) were added to refs/heads/master by this push:
     new efef5a3a6 resolved redundant call[IPUtils.getLocalAddress()] in SubscribeProcessor eventmesh-runtime (#2701)
efef5a3a6 is described below

commit efef5a3a6cc70d9cfd165463c5e3d2a67e18008d
Author: Ayush Singhal <35...@users.noreply.github.com>
AuthorDate: Thu Dec 29 09:32:42 2022 +0530

    resolved redundant call[IPUtils.getLocalAddress()] in SubscribeProcessor eventmesh-runtime (#2701)
---
 .../runtime/core/protocol/http/processor/SubscribeProcessor.java    | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/http/processor/SubscribeProcessor.java b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/http/processor/SubscribeProcessor.java
index 1eba6e287..6d6f54064 100644
--- a/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/http/processor/SubscribeProcessor.java
+++ b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/http/processor/SubscribeProcessor.java
@@ -75,12 +75,12 @@ public class SubscribeProcessor implements HttpRequestProcessor {
         HttpCommand responseEventMeshCommand;
         final HttpCommand request = asyncContext.getRequest();
         final Integer requestCode = Integer.valueOf(asyncContext.getRequest().getRequestCode());
+        final String localAddress = IPUtils.getLocalAddress();
 
         httpLogger.info("cmd={}|{}|client2eventMesh|from={}|to={}",
             RequestCode.get(requestCode),
             EventMeshConstants.PROTOCOL_HTTP,
-            RemotingHelper.parseChannelRemoteAddr(ctx.channel()), IPUtils.getLocalAddress()
-        );
+            RemotingHelper.parseChannelRemoteAddr(ctx.channel()), localAddress);
         SubscribeRequestHeader subscribeRequestHeader = (SubscribeRequestHeader) request.getHeader();
         SubscribeRequestBody subscribeRequestBody = (SubscribeRequestBody) request.getBody();
 
@@ -88,7 +88,7 @@ public class SubscribeProcessor implements HttpRequestProcessor {
             SubscribeResponseHeader
                 .buildHeader(requestCode,
                         eventMeshHTTPServer.getEventMeshHttpConfiguration().getEventMeshCluster(),
-                    IPUtils.getLocalAddress(),
+                        localAddress,
                         eventMeshHTTPServer.getEventMeshHttpConfiguration().getEventMeshEnv(),
                         eventMeshHTTPServer.getEventMeshHttpConfiguration().getEventMeshIDC());
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: commits-help@eventmesh.apache.org