mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-22 08:11:44 +00:00
HttpUtils.pm: better error handling when conn is replaced (Forum #126593)
git-svn-id: https://svn.fhem.de/fhem/trunk@25784 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
4f5e536f94
commit
2c4a4e6c0d
@ -509,6 +509,14 @@ HttpUtils_Connect2NonblockingSSL($$)
|
|||||||
"HttpUtils_TimeoutErr", \%timerHash);
|
"HttpUtils_TimeoutErr", \%timerHash);
|
||||||
|
|
||||||
$hash->{directReadFn} = sub() {
|
$hash->{directReadFn} = sub() {
|
||||||
|
if(!$hash->{conn}->can('connect_SSL')) { # 126593
|
||||||
|
my $err = "HttpUtils_Connect2NonblockingSSL: connection handle in ".
|
||||||
|
"$hash->{NAME} was replaced, terminating connection";
|
||||||
|
HttpUtils_Close($hash);
|
||||||
|
Log 1, $err;
|
||||||
|
return $hash->{callback}($hash, $err);
|
||||||
|
}
|
||||||
|
|
||||||
return if(!$hash->{conn}->connect_SSL() && $! == EWOULDBLOCK);
|
return if(!$hash->{conn}->connect_SSL() && $! == EWOULDBLOCK);
|
||||||
|
|
||||||
RemoveInternalTimer(\%timerHash);
|
RemoveInternalTimer(\%timerHash);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user