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

Disconnect overriden veza nodes #12

Closed
1 task
gc opened this issue May 5, 2019 · 0 comments
Closed
1 task

Disconnect overriden veza nodes #12

gc opened this issue May 5, 2019 · 0 comments

Comments

@gc
Copy link
Contributor

gc commented May 5, 2019

Describe the issue

When a new node is created with the same name as an exiting node, it will override that one and start receiving messages, the old one should disconnect as it is now doing nothing.

Code or steps to reproduce

Using the hello.js/world.js example, you can add this to the server (hello.js)

setInterval(() => {
	node.broadcast("ping", { timeout: 5000, receptive: false }).then(console.log).catch(console.error);
}, 3000);

and then, in the client (world.js)

.on('message', (message) => {
	console.log('New message on client');
	console.log(message);
});

next, start the server, and run the world.js file twice

Expected and actual behavior

Further details

  • node.js version:
  • veza version:
  • I have tested the issue on latest master. Commit hash:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants