2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-10 03:06:37 +00:00

HttpUtils.pm: Add debugging code (Forum #114513)

git-svn-id: https://svn.fhem.de/fhem/trunk@22917 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2020-10-05 14:37:58 +00:00
parent c9e150768b
commit a7f7c2e5bf

View File

@ -429,6 +429,11 @@ HttpUtils_Connect($)
delete($selectlist{$hash}); delete($selectlist{$hash});
RemoveInternalTimer(\%timerHash); RemoveInternalTimer(\%timerHash);
if(!$hash->{conn}) {
Log 1, "ERROR in HttpUtils: directWriteFn called without conn.";
map { Log 1, " $_=$hash->{$_}" } sort keys %{$hash};
return;
}
my $packed = getsockopt($hash->{conn}, SOL_SOCKET, SO_ERROR); my $packed = getsockopt($hash->{conn}, SOL_SOCKET, SO_ERROR);
my $errno = unpack("I",$packed); my $errno = unpack("I",$packed);
if($errno) { if($errno) {