Skip to content

Commit db64d36

Browse files
committed
properly handling the shutdown when multiple ones go on EAGAIN back to
back.
1 parent e99bbf9 commit db64d36

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

src/internal.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25063,6 +25063,19 @@ static int SendAlert_ex(WOLFSSL* ssl, int severity, int type)
2506325063
}
2506425064
#endif
2506525065

25066+
/*
25067+
* We check if we are trying to send a
25068+
* CLOSE_NOTIFY alert
25069+
* */
25070+
if (type == 0) {
25071+
if (!ssl->options.sentNotify) {
25072+
ssl->options.sentNotify = 1;
25073+
} else {
25074+
/* CLOSE_NOTIFY already sent */
25075+
return 0;
25076+
}
25077+
}
25078+
2506625079
ssl->buffers.outputBuffer.length += sendSz;
2506725080

2506825081
ret = SendBuffered(ssl);

0 commit comments

Comments
 (0)