Commit 4eeb2400 authored by Francesc Guasch's avatar Francesc Guasch
Browse files

refactor(frontend): empty ws didn't return anything

parent 8998be51
......@@ -60,7 +60,7 @@ sub open($self, $id) {
} elsif ($domain->type eq 'Void') {
$domain = Ravada::Front::Domain::Void->new( id => $id );
}
die "ERROR: Unknown domain id: $id\n"
confess "ERROR: Unknown domain id: $id\n"
unless exists $domain->{_data}->{name} && $domain->{_data}->{name};
return $domain;
}
......
......@@ -173,7 +173,6 @@ sub _ping_backend($rvd, $args) {
return 0 if $requested;
my @now = localtime(time);
my $seconds = $now[0];
warn $seconds;
Ravada::Request->ping_backend() if $seconds < 5;
return 1;
}
......@@ -207,6 +206,8 @@ sub _different_hash($h1,$h2) {
return 0;
}
sub _different($var1, $var2) {
return 1 if !defined $var1 && defined $var2;
return 1 if defined $var1 && !defined $var2;
return 1 if ref($var1) ne ref($var2);
return _different_list($var1, $var2) if ref($var1) eq 'ARRAY';
return _different_hash($var1, $var2) if ref($var1) eq 'HASH';
......@@ -243,7 +244,7 @@ sub subscribe($self, %args) {
$self->clients->{$ws} = {
ws => $ws
, %args
, ret => []
, ret => undef
};
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment