2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-24 02:59:22 +00:00

HttpUtils.pm: fix sysrite error checking (Forum #111888)

git-svn-id: https://svn.fhem.de/fhem/trunk@22132 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2020-06-07 09:06:48 +00:00
parent bbebc8d072
commit 92f5dab5e1

View File

@ -643,7 +643,7 @@ HttpUtils_Connect2($)
$data = $hdr.(defined($data) ? $data:"");
$hash->{directWriteFn} = sub($) { # Nonblocking write
my $ret = syswrite $hash->{conn}, $data;
if($ret <= 0) {
if(!defined($ret) || $ret <= 0) {
return if($! == EAGAIN);
my $err = $!;
RemoveInternalTimer(\%timerHash);