Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21484)
int is_fin = 0;
QUIC_STREAM *qs;
- if (!ossl_quic_channel_is_active(srv->ch))
- return 0;
-
qs = ossl_quic_stream_map_get_by_id(ossl_quic_channel_get_qsm(srv->ch),
stream_id);
if (qs == NULL) {
/*
* A client-initiated stream might spontaneously come into existence, so
- * allow trying to read on a client-initiated stream before it exists.
+ * allow trying to read on a client-initiated stream before it exists,
+ * assuming the connection is still active.
* Otherwise, fail.
*/
- if (!is_client_init)
+ if (!is_client_init || !ossl_quic_channel_is_active(srv->ch))
return 0;
*bytes_read = 0;