Skip to content

Commit

Permalink
Issue #6642 - use request UPGRADE_CONNECTION_ATTRIBUTE instead of 101…
Browse files Browse the repository at this point in the history
… response.

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
  • Loading branch information
lachlan-roberts committed Aug 31, 2021
1 parent 2d4693a commit edcb215
Showing 1 changed file with 1 addition and 2 deletions.
Expand Up @@ -28,7 +28,6 @@
import org.eclipse.jetty.http.HttpHeaderValue;
import org.eclipse.jetty.http.HttpMethod;
import org.eclipse.jetty.http.HttpParser;
import org.eclipse.jetty.http.HttpStatus;
import org.eclipse.jetty.http.MetaData;
import org.eclipse.jetty.http.PreEncodedHttpField;
import org.eclipse.jetty.io.AbstractConnection;
Expand Down Expand Up @@ -886,7 +885,7 @@ private void releaseChunk()
@Override
protected void onCompleteSuccess()
{
boolean upgrading = _info != null && _info.getStatus() == HttpStatus.SWITCHING_PROTOCOLS_101;
boolean upgrading = _channel.getRequest().getAttribute(UPGRADE_CONNECTION_ATTRIBUTE) != null;
release().succeeded();
// If successfully upgraded it is responsibility of the next protocol to close the connection.
if (_shutdownOut && !upgrading)
Expand Down

0 comments on commit edcb215

Please sign in to comment.