If a retry occurs we need to reset s->rlayer.wnum so that next time around
we remember how much data we already sent.
Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22473)
/* Retry needed */
i = HANDLE_RLAYER_WRITE_RETURN(s,
s->rlayer.wrlmethod->retry_write_records(s->rlayer.wrl));
- if (i <= 0)
+ if (i <= 0) {
+ s->rlayer.wnum = tot;
return i;
+ }
tot += s->rlayer.wpend_tot;
s->rlayer.wpend_tot = 0;
} /* else no retry required */
i = ssl->method->ssl_dispatch_alert(ssl);
if (i <= 0) {
/* SSLfatal() already called if appropriate */
+ s->rlayer.wnum = tot;
return i;
}
/* if it went, fall through and send more stuff */