Fix where the last flight was getting retransmit on timeout notification.

This commit is contained in:
John Safranek
2016-06-15 18:44:25 -07:00
parent 7a3cb23af9
commit 8f3c56c03f
2 changed files with 4 additions and 3 deletions

View File

@ -4752,8 +4752,7 @@ retry:
case WOLFSSL_CBIO_ERR_TIMEOUT:
if (ssl->options.dtls) {
#ifdef WOLFSSL_DTLS
if ((!ssl->options.handShakeDone ||
ssl->options.dtlsHsRetain) &&
if (!ssl->options.handShakeDone &&
DtlsPoolTimeout(ssl) == 0 &&
DtlsPoolSend(ssl) == 0) {

View File

@ -6617,7 +6617,9 @@ int wolfSSL_dtls_got_timeout(WOLFSSL* ssl)
{
int result = SSL_SUCCESS;
if (DtlsPoolTimeout(ssl) < 0 || DtlsPoolSend(ssl) < 0) {
if (!ssl->options.handShakeDone &&
(DtlsPoolTimeout(ssl) < 0 || DtlsPoolSend(ssl) < 0)) {
result = SSL_FATAL_ERROR;
}
return result;