diff --git a/src/liblsquic/lsquic_stream.c b/src/liblsquic/lsquic_stream.c index 36e1d18..0fb1856 100644 --- a/src/liblsquic/lsquic_stream.c +++ b/src/liblsquic/lsquic_stream.c @@ -1598,7 +1598,13 @@ stream_readf (struct lsquic_stream *stream, errno = EBADMSG; return -1; } - assert(stream->uh); + + if (!stream->uh) + { + LSQ_DEBUG("cannot read: headers not available"); + errno = EBADMSG; + return -1; + } } else {