mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-01 20:20:10 +00:00
HttpUtils.pm: log a stacktrace on problematic close (Forum #85640)
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@16407 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
46e4fda99c
commit
ea76079516
@ -369,7 +369,7 @@ FW_Read($$)
|
||||
$i += 4;
|
||||
}
|
||||
|
||||
my $data = substr($hash->{BUF}, $i, $len);
|
||||
#my $data = substr($hash->{BUF}, $i, $len);
|
||||
#for( my $i = 0; $i < $len; $i++ ) {
|
||||
# substr( $data, $i, 1, substr( $data, $i, 1, ) ^ substr($mask, $i% , 1) );
|
||||
#}
|
||||
|
@ -72,7 +72,14 @@ HttpUtils_Close($)
|
||||
my ($hash) = @_;
|
||||
delete($hash->{FD});
|
||||
delete($selectlist{$hash});
|
||||
$hash->{conn}->close() if(defined($hash->{conn}));
|
||||
if(defined($hash->{conn})) { # Forum #85640
|
||||
my $ref = eval { $hash->{conn}->can('close') };
|
||||
if($ref) {
|
||||
$hash->{conn}->close();
|
||||
} else {
|
||||
stacktrace();
|
||||
}
|
||||
}
|
||||
delete($hash->{conn});
|
||||
delete($hash->{hu_sslAdded});
|
||||
delete($hash->{hu_filecount});
|
||||
|
Loading…
x
Reference in New Issue
Block a user