Skip to content

Commit

Permalink
Merge pull request wso2#2095 from malakaganga/rem_discard_log
Browse files Browse the repository at this point in the history
Remove warn log from consumeAndDiscard method
  • Loading branch information
arunans23 authored May 16, 2023
2 parents 4bf24f6 + cffa133 commit bcbebf2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -374,8 +374,14 @@ public void responseReceived(NHttpClientConnection conn) {
if (connState != ProtocolState.REQUEST_DONE) {
isError = true;
MessageContext requestMsgContext = TargetContext.get(conn).getRequestMsgCtx();
log.warn("Response received before the request is sent to the backend completely , CORRELATION_ID = "
+ conn.getContext().getAttribute(CorrelationConstants.CORRELATION_ID));
if (conf.isConsumeAndDiscard()) {
log.warn("Response received before the request is sent to the backend completely , CORRELATION_ID = "
+ conn.getContext().getAttribute(CorrelationConstants.CORRELATION_ID) + ". Consuming the " +
"pipe and discarding the data completely");
} else {
log.warn("Response received before the request is sent to the backend completely , CORRELATION_ID = "
+ conn.getContext().getAttribute(CorrelationConstants.CORRELATION_ID));
}
// State is not REQUEST_DONE. i.e the request is not completely written. But the response is started
// receiving, therefore informing a write error has occurred. So the thread which is
// waiting on writing the request out, will get notified. And we will proceed with the response
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -531,9 +531,6 @@ public static void discardRequestMessage(MessageContext msgContext) throws AxisF
if (outTransportInfo instanceof ServerWorker) {
requestContext = ((ServerWorker) outTransportInfo).getRequestContext();
}
log.warn("Server encountered an error, the request message will be consumed and discarded, " +
getRequestInfoForLogging(requestContext) + ", Correlation ID = " +
requestContext.getProperty(CorrelationConstants.CORRELATION_ID));
discardMessage(requestContext);
}

Expand Down

0 comments on commit bcbebf2

Please sign in to comment.