mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-23 20:52:13 +00:00
update: do not write controlfile on error
HttpUtils: default noshutdown is changed 1 (due to squid) / shutdown option added git-svn-id: https://svn.fhem.de/fhem/trunk@5569 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
bbe77a2ff6
commit
f7bb97c3d9
@ -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
|
||||
|
@ -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({
|
||||
|
Loading…
x
Reference in New Issue
Block a user