mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-02 04:04:31 +02:00
Merge branch 'feature/esp-tls' into 'master'
esp-tls: Fix connection failure See merge request idf/esp-idf!2241
This commit is contained in:
@@ -279,12 +279,11 @@ esp_tls_t *esp_tls_conn_new(const char *hostname, int hostlen, int port, const e
|
|||||||
}
|
}
|
||||||
tls->read = tls_read;
|
tls->read = tls_read;
|
||||||
tls->write = tls_write;
|
tls->write = tls_write;
|
||||||
}
|
|
||||||
|
|
||||||
if (cfg->non_block == true) {
|
if (cfg->non_block == true) {
|
||||||
int flags = fcntl(tls->sockfd, F_GETFL, 0);
|
int flags = fcntl(tls->sockfd, F_GETFL, 0);
|
||||||
fcntl(tls->sockfd, F_SETFL, flags | O_NONBLOCK);
|
fcntl(tls->sockfd, F_SETFL, flags | O_NONBLOCK);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return tls;
|
return tls;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user