FIX: only update error on subscriptions if really on error
This commit is contained in:
parent
b696bff31e
commit
1f03b8179c
@ -238,10 +238,13 @@ sub NTFY_WS_CB
|
|||||||
|
|
||||||
my $name = $hash->{NAME};
|
my $name = $hash->{NAME};
|
||||||
|
|
||||||
|
if ($error)
|
||||||
|
{
|
||||||
readingsBeginUpdate($hash);
|
readingsBeginUpdate($hash);
|
||||||
readingsBulkUpdate($hash, "state", "error");
|
readingsBulkUpdate($hash, "state", "error");
|
||||||
readingsBulkUpdate($hash, "error", $error);
|
readingsBulkUpdate($hash, "error", $error);
|
||||||
readingsEndUpdate($hash,1);
|
readingsEndUpdate($hash,1);
|
||||||
|
}
|
||||||
|
|
||||||
NTFY_LOG(LOG_ERROR, "error while connecting to websocket: $error ") if $error;
|
NTFY_LOG(LOG_ERROR, "error while connecting to websocket: $error ") if $error;
|
||||||
NTFY_LOG(LOG_DEBUG, "websocket callback called");
|
NTFY_LOG(LOG_DEBUG, "websocket callback called");
|
||||||
|
Loading…
Reference in New Issue
Block a user