forked from wolfSSL/wolfssl
properly handling the shutdown when multiple ones go on EAGAIN back to
back.
This commit is contained in:
@ -25063,6 +25063,19 @@ static int SendAlert_ex(WOLFSSL* ssl, int severity, int type)
|
|||||||
}
|
}
|
||||||
#endif
|
#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;
|
ssl->buffers.outputBuffer.length += sendSz;
|
||||||
|
|
||||||
ret = SendBuffered(ssl);
|
ret = SendBuffered(ssl);
|
||||||
|
Reference in New Issue
Block a user