mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
esp-tls: Fix connection failure when esp-tls config is empty
This commit is contained in:
parent
a48e0121e0
commit
0d0445103b
@ -277,13 +277,12 @@ esp_tls_t *esp_tls_conn_new(const char *hostname, int hostlen, int port, const e
|
|||||||
esp_tls_conn_delete(tls);
|
esp_tls_conn_delete(tls);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
tls->read = tls_read;
|
tls->read = tls_read;
|
||||||
tls->write = tls_write;
|
tls->write = tls_write;
|
||||||
}
|
if (cfg->non_block == true) {
|
||||||
|
int flags = fcntl(tls->sockfd, F_GETFL, 0);
|
||||||
if (cfg->non_block == true) {
|
fcntl(tls->sockfd, F_SETFL, flags | O_NONBLOCK);
|
||||||
int flags = fcntl(tls->sockfd, F_GETFL, 0);
|
}
|
||||||
fcntl(tls->sockfd, F_SETFL, flags | O_NONBLOCK);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return tls;
|
return tls;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user