mirror of
https://github.com/openssl/openssl.git
synced 2025-01-30 14:01:55 +08:00
Handle the case where the read buffer is empty but we have received FIN
In some cases where a FIN has been received but with no data quic_read_actual was failing to raise SSL_ERROR_ZERO_RETURN. This meant that we could end up blocking in SSL_read(_ex) for too long. Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21780)
This commit is contained in:
parent
d561fe5a0a
commit
72622c0b96
@ -2237,6 +2237,9 @@ static int quic_read_actual(QCTX *ctx,
|
||||
stream);
|
||||
}
|
||||
|
||||
if (*bytes_read == 0 && is_fin)
|
||||
return QUIC_RAISE_NORMAL_ERROR(ctx, SSL_ERROR_ZERO_RETURN);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user