Skip to content

Commit

Permalink
make sure the stream is not null before using it
Browse files Browse the repository at this point in the history
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
  • Loading branch information
lorban committed May 11, 2021
1 parent b5b3874 commit c3c51a1
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,8 @@ public boolean failAllContent(Throwable failure)
{
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);
Expand Down

0 comments on commit c3c51a1

Please sign in to comment.