Merge pull request #6222 from JacobBarthelmeh/alerts

don't try to send an alert to a disconnected peer
This commit is contained in:
David Garske 2023-03-23 09:49:15 -07:00 committed by GitHub
commit aeffe6cfa7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16045,6 +16045,12 @@ void SendFatalAlertOnly(WOLFSSL *ssl, int error)
case WC_PENGIND_E:
#endif
return;
/* peer already disconnected and ssl is possibly in bad state
* don't try to send an alert */
case SOCKET_ERROR_E:
return;
case BUFFER_ERROR:
case ASN_PARSE_E:
case COMPRESSION_ERROR: