Skip to content

Commit

Permalink
resolved redundant call[IPUtils.getLocalAddress()] in SubscribeProces…
Browse files Browse the repository at this point in the history
…sor eventmesh-runtime (#2701)
  • Loading branch information
ayushsinghal90 authored Dec 29, 2022
1 parent a62e08b commit 0b4596b
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,20 +75,20 @@ public void processRequest(ChannelHandlerContext ctx, AsyncContext<HttpCommand>
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();

SubscribeResponseHeader subscribeResponseHeader =
SubscribeResponseHeader
.buildHeader(requestCode,
eventMeshHTTPServer.getEventMeshHttpConfiguration().getEventMeshCluster(),
IPUtils.getLocalAddress(),
localAddress,
eventMeshHTTPServer.getEventMeshHttpConfiguration().getEventMeshEnv(),
eventMeshHTTPServer.getEventMeshHttpConfiguration().getEventMeshIDC());

Expand Down

0 comments on commit 0b4596b

Please sign in to comment.