diff --git a/FHEM/98_update.pm b/FHEM/98_update.pm index fdabb1e29..fadb59b3b 100644 --- a/FHEM/98_update.pm +++ b/FHEM/98_update.pm @@ -451,6 +451,7 @@ update_DoUpdate(@) my $getUpdates; ($fail,$getUpdates) = update_GetRemoteFiles($BRANCH,$url,$updateFiles_ref,$cl); $ret .= $getUpdates if($getUpdates); + return $ret if($fail); foreach my $pack (@packages) { # write local controlfile diff --git a/FHEM/HttpUtils.pm b/FHEM/HttpUtils.pm index 7b2e7a213..31c0eda6c 100644 --- a/FHEM/HttpUtils.pm +++ b/FHEM/HttpUtils.pm @@ -200,7 +200,8 @@ HttpUtils_Connect2($) $hdr .= "\r\n"; syswrite $hash->{conn}, $hdr; syswrite $hash->{conn}, $data if(defined($data)); - shutdown $hash->{conn}, 1 if(!$hash->{noshutdown} && $hash->{protocol} ne "https"); + shutdown $hash->{conn}, 1 if($hash->{shutdown} || + (defined($hash->{noshutdown}) && $hash->{noshutdown} == 0)); if($hash->{callback}) { # Nonblocking read $hash->{FD} = $hash->{conn}->fileno(); @@ -299,7 +300,8 @@ HttpUtils_ParseAnswer($$) # mandatory: # url, callback # optional(default): -# hideurl(0),timeout(4),data(""),noshutdown(0),loglevel(4),header(""), +# hideurl(0),timeout(4),data(""),loglevel(4),header(""), +# noshutdown(1),shutdown(0), # method($data ? "POST" : "GET") # Example: # HttpUtils_NonblockingGet({