Skip to content

Commit

Permalink
Issue #6642 - change HttpGenerator state to END before returning
Browse files Browse the repository at this point in the history
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
  • Loading branch information
lachlan-roberts committed Aug 25, 2021
1 parent f7d9d8f commit cb9a8d4
Showing 1 changed file with 1 addition and 2 deletions.
Expand Up @@ -344,6 +344,7 @@ private Result completing(ByteBuffer chunk, ByteBuffer content)
_endOfContent = EndOfContent.UNKNOWN_CONTENT;
return Result.FLUSH;
}
_state = State.END;

// If this is an upgrade then we don't want to close the connection.
if (_info.isResponse() && ((MetaData.Response)_info).getStatus() == HttpStatus.SWITCHING_PROTOCOLS_101)
Expand All @@ -356,8 +357,6 @@ else if (_info.isRequest())
if (connectionHeader != null && connectionHeader.contains(HttpHeaderValue.UPGRADE.asString()))
return Result.DONE;
}

_state = State.END;
return Boolean.TRUE.equals(_persistent) ? Result.DONE : Result.SHUTDOWN_OUT;
}

Expand Down

0 comments on commit cb9a8d4

Please sign in to comment.