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

client parameter is null on publish event #7

Closed
jeremytregunna opened this issue Nov 15, 2015 · 3 comments
Closed

client parameter is null on publish event #7

jeremytregunna opened this issue Nov 15, 2015 · 3 comments

Comments

@jeremytregunna
Copy link

Like the title says, when implementing the publish event like this:

aedes.on('publish', function(packet, client) {
  console.log('client = ' + client);
});

The console will always be null. The little documentation that's in place tends to lean towards that client should be populated except for internal messages. Is this a wrong assertion? If so, in what cases should the publish event return a client?

@mcollina
Copy link
Collaborator

That should be the case, client will be populated when there is a client.
If not, that would be a bug.

How do you reproduce?

@jeremytregunna
Copy link
Author

So I'm using mosquitto_pub/sub to test. The client event shows the client, but when I run:

mosquitto_pub -t test -m 123

And in the server code I'm using the above posted code, I always see client = null in my console.

@mcollina
Copy link
Collaborator

Releases as 0.10.3.

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