From 5b0fc348882d6f0823067bbdd10633959ebf71a9 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Fri, 7 Aug 2015 08:45:22 +0200 Subject: [PATCH] Fix checking invitation reponse --- vroom.pl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/vroom.pl b/vroom.pl index b63eec1..72ef438 100755 --- a/vroom.pl +++ b/vroom.pl @@ -1481,8 +1481,10 @@ websocket '/socket.io/:ver/websocket/:id' => sub { ) ); } - delete $peer->{check_invitations}; - $self->add_peer($id, $peer); + if (keys %{$invitations} > 0){ + delete $peer->{check_invitations}; + $self->add_peer($id, $peer); + } } $self->send(Protocol::SocketIO::Message->new( type => 'heartbeat' )); });