HttpExchange could be null during parse()

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
This commit is contained in:
Lachlan Roberts 2020-09-01 10:03:18 +10:00
parent ae62180416
commit abb5ae8812
1 changed files with 2 additions and 1 deletions

View File

@ -235,7 +235,8 @@ public class HttpReceiverOverHTTP extends HttpReceiver implements HttpParser.Res
if (complete)
{
if (getHttpExchange().getResponse().getStatus() == HttpStatus.SWITCHING_PROTOCOLS_101)
HttpExchange httpExchange = getHttpExchange();
if (httpExchange != null && httpExchange.getResponse().getStatus() == HttpStatus.SWITCHING_PROTOCOLS_101)
return true;
if (LOG.isDebugEnabled())