Issue #6642 - check for null Metadata in HttpConnection

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
This commit is contained in:
Lachlan Roberts 2021-08-27 14:51:07 +10:00
parent 949aa6c342
commit 2d4693a288
1 changed files with 1 additions and 1 deletions

View File

@ -886,7 +886,7 @@ public class HttpConnection extends AbstractConnection implements Runnable, Http
@Override @Override
protected void onCompleteSuccess() protected void onCompleteSuccess()
{ {
boolean upgrading = _info.getStatus() == HttpStatus.SWITCHING_PROTOCOLS_101; boolean upgrading = _info != null && _info.getStatus() == HttpStatus.SWITCHING_PROTOCOLS_101;
release().succeeded(); release().succeeded();
// If successfully upgraded it is responsibility of the next protocol to close the connection. // If successfully upgraded it is responsibility of the next protocol to close the connection.
if (_shutdownOut && !upgrading) if (_shutdownOut && !upgrading)