Skip to content

Commit

Permalink
Merge pull request #2206 from senthuran16/fix-eptimeout-conn-close_ma…
Browse files Browse the repository at this point in the history
…ster

Fix connection close during endpoint timeout when reusing a connection
  • Loading branch information
isudana authored Jul 25, 2024
2 parents ff65b7b + 7a680ac commit 8648562
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -259,9 +259,6 @@ public void connected(HttpRoute route, NHttpClientConnection conn) {
MessageContext messageContext = queue.poll();

if (messageContext != null) {
messageContext.setProperty(PassThroughConstants.PASS_THROUGH_TARGET_CONNECTION, conn);
messageContext.setProperty(PassThroughConstants.PASS_THROUGH_TARGET_CONFIGURATION,
targetConfiguration);
tryNextMessage(messageContext, route, conn);
conn = null;
}
Expand All @@ -279,6 +276,8 @@ public void connected(HttpRoute route, NHttpClientConnection conn) {
private void tryNextMessage(MessageContext messageContext, HttpRoute route, NHttpClientConnection conn) {
if (conn != null) {
try {
messageContext.setProperty(PassThroughConstants.PASS_THROUGH_TARGET_CONNECTION, conn);
messageContext.setProperty(PassThroughConstants.PASS_THROUGH_TARGET_CONFIGURATION, targetConfiguration);
HttpContext ctx = conn.getContext();
/*
* If the flow is SSE we need to set references to target connection and targetConnections
Expand Down

0 comments on commit 8648562

Please sign in to comment.