Merge branch 'bugfix/tls_handshake_backport_v3.3' into 'release/v3.3'

bugfix/tls_handshake:(Backport v3.3) Fixed an error check during TLS handshake.

See merge request sdk/ESP8266_RTOS_SDK!1290
This commit is contained in:
Dong Heng
2020-01-14 16:29:42 +08:00

View File

@@ -107,7 +107,7 @@ IoT_Error_t iot_tls_connect(Network *pNetwork, TLSConnectParams *params) {
ret = SSL_CONNECTION_ERROR;
} else {
int tls_ret = esp_tls_conn_new_sync(pNetwork->tlsConnectParams.pDestinationURL, strlen(pNetwork->tlsConnectParams.pDestinationURL), pNetwork->tlsConnectParams.DestinationPort, &cfg, tls);
if (tls_ret) {
if (tls_ret == -1) {
ret = SSL_CONNECTION_ERROR;
esp_tls_conn_delete(tls);
}