make sure the stream is not null before using it

Signed-off-by: Ludovic Orban <lorban@bitronix.be>
This commit is contained in:
Ludovic Orban 2021-05-10 12:49:23 +02:00
parent b5b3874275
commit c3c51a164e
1 changed files with 2 additions and 1 deletions

View File

@ -587,7 +587,8 @@ public class HttpChannelOverHTTP2 extends HttpChannel implements Closeable, Writ
{
if (LOG.isDebugEnabled())
LOG.debug("failing all content with {} {}", failure, this);
boolean atEof = getStream().failAllData(failure);
IStream stream = getStream();
boolean atEof = stream == null || stream.failAllData(failure);
atEof |= _contentDemander.failContent(failure);
if (LOG.isDebugEnabled())
LOG.debug("failed all content, reached EOF? {}", atEof);