From fcf910fc803a5faf226caf5edf154ec22b7eeae9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jozef=20Matick=C3=BD?= Date: Fri, 24 Nov 2017 02:20:19 +0100 Subject: [PATCH] Create non-blocking socket with WiFiClientSecure SSL_READ_BLOCKING was causing the code to get stuck on functions using SSL socket (available(), connected() etc.) when connection to the server suddenly broke. As this was not really a stuck CPU WDT never fired. --- libraries/ESP8266WiFi/src/WiFiClientSecure.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/ESP8266WiFi/src/WiFiClientSecure.cpp b/libraries/ESP8266WiFi/src/WiFiClientSecure.cpp index e7bcb1a4e4..aba9a95897 100644 --- a/libraries/ESP8266WiFi/src/WiFiClientSecure.cpp +++ b/libraries/ESP8266WiFi/src/WiFiClientSecure.cpp @@ -56,7 +56,7 @@ class SSLContext SSLContext() { if (_ssl_ctx_refcnt == 0) { - _ssl_ctx = ssl_ctx_new(SSL_SERVER_VERIFY_LATER | SSL_DEBUG_OPTS | SSL_CONNECT_IN_PARTS | SSL_READ_BLOCKING | SSL_NO_DEFAULT_KEY, 0); + _ssl_ctx = ssl_ctx_new(SSL_SERVER_VERIFY_LATER | SSL_DEBUG_OPTS | SSL_CONNECT_IN_PARTS | SSL_NO_DEFAULT_KEY, 0); } ++_ssl_ctx_refcnt; }