properly handling the shutdown when multiple ones go on EAGAIN back to

back.
This commit is contained in:
Reda Chouk
2024-08-16 23:04:47 +02:00
parent e99bbf9429
commit db64d36f00

View File

@ -25063,6 +25063,19 @@ static int SendAlert_ex(WOLFSSL* ssl, int severity, int type)
}
#endif
/*
* We check if we are trying to send a
* CLOSE_NOTIFY alert
* */
if (type == 0) {
if (!ssl->options.sentNotify) {
ssl->options.sentNotify = 1;
} else {
/* CLOSE_NOTIFY already sent */
return 0;
}
}
ssl->buffers.outputBuffer.length += sendSz;
ret = SendBuffered(ssl);