Skip to content

Commit

Permalink
fixup! QUIC err handling: Properly report network errors
Browse files Browse the repository at this point in the history
  • Loading branch information
t8m committed May 31, 2023
1 parent 6f42b5a commit b5662de
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ssl/quic/quic_impl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1547,11 +1547,16 @@ SSL *ossl_quic_conn_stream_new(SSL *s, uint64_t flags)
int ossl_quic_get_error(const SSL *s, int i)
{
QCTX ctx;
int net_error;

if (!expect_quic(s, &ctx))
return 0;

if (ossl_quic_channel_net_error(ctx.qc->ch))
quic_lock(&ctx.qc);
net_error = ossl_quic_channel_net_error(ctx.qc->ch);
quic_unlock(&ctx.qc);

if (net_error)
return SSL_ERROR_SYSCALL;

return ctx.is_stream ? ctx.xso->last_error : ctx.qc->last_error;
Expand Down

0 comments on commit b5662de

Please sign in to comment.