check for socket errors on SendAlert

pull/6406/head
JacobBarthelmeh 2023-05-12 09:52:01 -07:00
parent 56cd8c3dc1
commit ea40176bee
1 changed files with 8 additions and 1 deletions

View File

@ -33327,7 +33327,14 @@ static int DoSessionTicket(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
if (ret != 0 || !ssl->options.dtlsStateful) {
int alertType = TranslateErrorToAlert(ret);
if (alertType != invalid_alert)
SendAlert(ssl, alert_fatal, alertType);
if (alertType != invalid_alert) {
int err;
/* propogate socket errors to avoid re-calling send alert */
err = SendAlert(ssl, alert_fatal, alertType);
if (err == SOCKET_ERROR_E)
ret = SOCKET_ERROR_E;
}
*inOutIdx += helloSz;
DtlsResetState(ssl);
if (DtlsIgnoreError(ret))