mirror of
https://github.com/dani/vroom.git
synced 2024-06-01 21:11:41 +02:00
Don't try to notify for peers who hasn't joined any room
This commit is contained in:
parent
ef9489ad43
commit
918a0c03f5
1
vroom.pl
1
vroom.pl
|
@ -1030,6 +1030,7 @@ websocket '/socket.io/:ver/websocket/:id' => sub {
|
|||
$self->app->log->debug("Client id " . $id . " closed websocket connection");
|
||||
foreach my $peer (keys %$peers){
|
||||
next if $peer eq $id;
|
||||
next if !$peers->{$peer}->{room};
|
||||
next if $peers->{$peer}->{room} ne $peers->{$id}->{room};
|
||||
$self->app->log->debug("Notifying $peer that $id leaved");
|
||||
$peers->{$peer}->{socket}->send(
|
||||
|
|
Loading…
Reference in New Issue
Block a user