2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-16 16:56:04 +00:00

DevIo.pm: Better error message for NonBlocking by Markus (Forum #59419)

git-svn-id: https://svn.fhem.de/fhem/trunk@12397 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2016-10-22 10:10:29 +00:00
parent 50703cc3f2
commit 54fd8c21df

View File

@ -204,6 +204,7 @@ DevIo_OpenDev($$$;$)
my $doCb = sub ($) {
my ($r) = @_;
Log3 $name, 3, "Can't connect to $dev: $r" if(!$reopen && $r);
$callback->($hash,$r) if($callback);
return $r;
};
@ -315,7 +316,7 @@ DevIo_OpenDev($$$;$)
$conn->setsockopt(SOL_SOCKET, SO_KEEPALIVE, 1) if(defined($conn));
} else {
Log3 $name, 3, "Can't connect to $dev: $!" if(!$reopen);
Log3 $name, 3, "Can't connect to $dev: $!" if(!$reopen && $!);
$readyfnlist{"$name.$dev"} = $hash;
DevIo_setStates($hash, "disconnected");
$hash->{NEXT_OPEN} = time() + $nextOpenDelay;