neurosity / openbci-dashboard

A fullstack javascript app for capturing and visualizing OpenBCI EEG data
93 stars 23 forks source link

io.on('connection',... being called multiple times #10

Closed andrewjaykeller closed 8 years ago

andrewjaykeller commented 8 years ago

Is there a reason this continually gets called?

I see A user connected get printed a lot

alexcastillo commented 8 years ago

io.on('connection') is called every time a listener subscribes to sockets and that currently happens when any component using sockets is active, so every time you switch tabs.

I think this is a good thing because there's never multiple event listeners active.