Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Users playing a song isn't representative #48

Open
pepf opened this issue Jun 29, 2014 · 2 comments
Open

Users playing a song isn't representative #48

pepf opened this issue Jun 29, 2014 · 2 comments
Labels
Milestone

Comments

@pepf
Copy link
Contributor

pepf commented Jun 29, 2014

It never deletes user's of the list. We should make use of some sort of polling to make sure user is actually still playing the list or logged in, otherwise remove the user.

Something like
https://github.com/murilopolese/howmanypeoplearelooking
could be a good starting point

@reinzor
Copy link
Contributor

reinzor commented Jun 29, 2014

Just log a time stamp . No polling
On Jun 29, 2014 5:13 PM, "Pepijn" [email protected] wrote:

It never deletes user's of the list. We should make use of some sort of
polling to make sure user is actually still playing the list or logged in,
otherwise remove the user.

Something like
https://github.com/murilopolese/howmanypeoplearelooking
could be a good starting point


Reply to this email directly or view it on GitHub
#48.

@Rayman Rayman added the bug label Jun 29, 2014
@Rayman Rayman added this to the v0.2 milestone Jun 29, 2014
@pepf
Copy link
Contributor Author

pepf commented Jun 30, 2014

Sorry, I didn't mean polling; the "howmanypeoplearelooking" solution is about monitoring the "socket close" event from somewhere deep inside the core of Meteor and then mapping it to one of the userIds.
I think that's pretty clever, when you're disconnected obviously you can't be playing any songs.

So this part:

 socket.on('close', Meteor.bindEnvironment(function () {
            People.remove({
                connectionID: socket.id
            });

is where they basically remove a user from a collection based on the socket.id.

@Rayman Rayman modified the milestones: v0.3, v0.2 Jul 6, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants