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 <[email protected]>
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: [email protected]
For additional commands, e-mail: [email protected]