Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1058,32 +1058,8 @@ private void informWriterError(NHttpClientConnection conn) {
}
}

/**
* Invoked when the backend terminates the outbound HTTP connection unexpectedly.
* Logs diagnostics, marks the connection CLOSED, shuts it down, and routes the error
* to the standard fault handler.
*
* @param conn the target {@link NHttpClientConnection} that ended input
* @throws IOException if an error occurs while closing the connection
*/
public void endOfInput(NHttpClientConnection conn) throws IOException {

ProtocolState state = TargetContext.getState(conn);
log.warn("Connection ended unexpectedly" +
", " + getConnectionLoggingInfo(conn) +
", State: " + state + ".");
TargetContext.updateState(conn, ProtocolState.CLOSED);
targetConfiguration.getConnections().shutdownConnection(conn, true);
MessageContext requestMsgCtx = TargetContext.get(conn).getRequestMsgCtx();
if (requestMsgCtx != null) {
requestMsgCtx.setProperty(PassThroughConstants.INTERNAL_EXCEPTION_ORIGIN,
PassThroughConstants.INTERNAL_ORIGIN_ERROR_HANDLER);
targetErrorHandler.handleError(requestMsgCtx,
ErrorCodes.SND_IO_ERROR,
"Error In Sender",
null,
state);
}
conn.close();
}

public void exception(NHttpClientConnection conn, Exception ex) {
Expand Down
Loading