From 27d4232e22d904f8fd202d52cdc06ce2006c160a Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Thu, 3 Feb 2022 20:04:13 +0000 Subject: [PATCH] HttpUtils.pm: next round of nonblocking start_SSL fixes (Forum #125939) git-svn-id: https://svn.fhem.de/fhem/trunk@25624 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/HttpUtils.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fhem/FHEM/HttpUtils.pm b/fhem/FHEM/HttpUtils.pm index 2b360a7e5..0001a5e4d 100644 --- a/fhem/FHEM/HttpUtils.pm +++ b/fhem/FHEM/HttpUtils.pm @@ -522,7 +522,7 @@ HttpUtils_Connect2NonblockingSSL($$) "$! ".($SSL_ERROR ? $SSL_ERROR : IO::Socket::SSL::errstr())); } - $hash->{hu_sslAdded} = 1; + $hash->{hu_sslAdded} = $hash->{keepalive} ? 1 : 2; return HttpUtils_Connect2($hash); # Continue with HTML-Processing }; @@ -591,6 +591,9 @@ HttpUtils_Connect2($) } } + delete($hash->{hu_sslAdded}) # Coming from HttpUtils_Connect2NonblockingSSL + if($hash->{hu_sslAdded} && $hash->{hu_sslAdded} == 2); + if(!$hash->{conn}) { undef $hash->{conn}; my $err = $@;