HttpUptil.pm: fix 2nd get with the same $hash (Forum #62260)
git-svn-id: https://svn.fhem.de/fhem/trunk@12740 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
@@ -406,6 +406,7 @@ HttpUtils_Connect2($)
|
||||
$hash->{FD} = $hash->{conn}->fileno();
|
||||
$hash->{buf} = "";
|
||||
delete($hash->{httpdatalen});
|
||||
delete($hash->{httpheader});
|
||||
$hash->{NAME} = "" if(!defined($hash->{NAME}));
|
||||
my %timerHash = (hash=>$hash, checkSTS=>$selectTimestamp, msg=>"write to");
|
||||
$hash->{directReadFn} = sub() {
|
||||
@@ -595,6 +596,7 @@ HttpUtils_ParseAnswer($)
|
||||
}
|
||||
}
|
||||
my $ret = $hash->{httpdata};
|
||||
$ret = "" if(!defined($ret));
|
||||
delete $hash->{httpdata};
|
||||
delete $hash->{httpdatalen};
|
||||
|
||||
@@ -708,6 +710,7 @@ HttpUtils_BlockingGet($)
|
||||
$hash->{conn}->timeout($hash->{timeout});
|
||||
$hash->{buf} = "";
|
||||
delete($hash->{httpdatalen});
|
||||
delete($hash->{httpheader});
|
||||
for(;;) {
|
||||
my ($rout, $rin) = ('', '');
|
||||
vec($rin, $hash->{conn}->fileno(), 1) = 1;
|
||||
|
||||
Reference in New Issue
Block a user