Skip to content

Socket.io multiple connection of same client #857

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

Closed
ghost opened this issue Feb 28, 2015 · 4 comments
Closed

Socket.io multiple connection of same client #857

ghost opened this issue Feb 28, 2015 · 4 comments

Comments

@ghost
Copy link

ghost commented Feb 28, 2015

Hi,

I'm currently facing an issue with Socket.io:

  1. When a client connect to the server socket.address is 'undefined:undefined' because socket.handshake.address.address and socket.handshake.address.port don't exist (socket.address is like "127.0.0.1" with string directly not object
  2. If my client (my browser on the same machine - cause I'm in development phase) refresh the page a new connection is created and all api sockets are registered again with the conclusion that when an event is emitted it is emitted many times (depending on a many times the page has been refreshed).

How to avoid the same client to be connected many times and avoiding many registration of socket events for the same client ?

Thanks in advance.

@JaKXz JaKXz added the question label Mar 6, 2015
@Petro-Kashpurenko
Copy link

+1 UP

@georgeportillo
Copy link

This is also something I encountered

@javierbq
Copy link

+1 this drove me crazy! I just added logic to the front end so it would ignore repeated messages.

@kingcody
Copy link
Member

kingcody commented Jul 5, 2015

See #490

@Awk34 Awk34 closed this as completed Jul 14, 2015
kingcody added a commit to kingcody/generator-angular-fullstack that referenced this issue Jul 15, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants