Handle leave and disconnect msg

And log unhandled messages
master
Daniel Berteaud 10 years ago
parent 4dc08868f5
commit 8753ff81b7
  1. 6
      vroom.pl

@ -1023,6 +1023,12 @@ websocket '/socket.io/:ver/websocket/:id' => sub {
);
}
}
elsif ($msg->{data}->{name} =~ m/^leave|disconnect$/){
$peers->{$id}->{socket}->{finish};
}
else{
$self->app->log->debug("Unhandled SocketIO message\n" . Dumper $msg);
}
}
# Heartbeat reply, update timestamp
elsif ($msg->type eq 'heartbeat'){

Loading…
Cancel
Save