Skip to content
This repository has been archived by the owner on Feb 11, 2020. It is now read-only.

client.emit is not a function #483

Closed
behrad opened this issue May 28, 2016 · 9 comments
Closed

client.emit is not a function #483

behrad opened this issue May 28, 2016 · 9 comments

Comments

@behrad
Copy link
Contributor

behrad commented May 28, 2016

In some cases I have

TypeError: client.emit is not a function
    at /root/chabok/source/node_modules/mosca/lib/persistence/abstract.js:89:16
    at /root/chabok/source/node_modules/mosca/lib/persistence/redis.js:216:7

Shouldn't client.emit('error') have been client.connection.emit('error')?

@mcollina
Copy link
Collaborator

Yes, good catch! PR?

@behrad
Copy link
Contributor Author

behrad commented May 29, 2016

sure 👍

@behrad
Copy link
Contributor Author

behrad commented May 29, 2016

Before creating PR, after checking out my upstream/master (which is mosca's master) I see tests are failing!?

mosca server should fail if persistence can not connect

@mcollina
Copy link
Collaborator

Not sure, things are passing here

@behrad
Copy link
Contributor Author

behrad commented May 29, 2016

Not on my side!

@mcollina
Copy link
Collaborator

tests are passing on the cloud.

@behrad
Copy link
Contributor Author

behrad commented May 30, 2016

Strange! I did it with commit -n !!!

@mcollina
Copy link
Collaborator

You might had some spurious/unwanted dependency on node_modules

@behrad
Copy link
Contributor Author

behrad commented May 30, 2016

don't know! did a clean fresh npm install

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants