From 1065b747fe0f660b1b808ae94068261b22d9b70f Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Thu, 26 Nov 2015 18:10:20 +0100 Subject: [PATCH] Minor comment --- vroom | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/vroom b/vroom index 521eaf1..ee44b08 100755 --- a/vroom +++ b/vroom @@ -1296,8 +1296,7 @@ websocket '/socket.io/:ver/websocket/:id' => sub { my $key = $self->session('key'); # Add the peer on redis - $self->add_peer($id, - { + $self->add_peer($id, { last => time, id => $self->session('id'), check_invitations => 1 @@ -1306,6 +1305,8 @@ websocket '/socket.io/:ver/websocket/:id' => sub { $self->redis->subscribe(['signaling:peer:' . $id]); + # This callback will send the message to the peer through + # websocket when received on the personnal channel $cb = $self->redis->on(message => sub { my ($redis, $message, $channel) = @_; $self->tx->send(Protocol::SocketIO::Message->new->parse(Mojo::JSON::from_json($message)))