moscajs / mosca

MQTT broker as a module
mosca.io
3.2k stars 509 forks source link

Fixbug (subscribes with same topic, may lead to the ascoltatore added multi cbs, and can't unsubscribe) #545

Closed happybin92 closed 7 years ago

happybin92 commented 7 years ago

Hi mcollina, I find a bug with mosca. if we continuously send multi subscribe messages with an same topic, sometimes it will add multi callback to ascoltatore and can't unsubscribed successfully. More detail see the comment.

mcollina commented 7 years ago

Can you please add a unit test?

happybin92 commented 7 years ago

Hi, mcollina. I have added a test. It has 4 steps.

I run it on my machine. Can you help me to check that ? Thank you~~

mcollina commented 7 years ago

@happybin92 what should I help you with?

@behrad what do you think of this?

happybin92 commented 7 years ago

Could you help me to review my code? It's my first PR in github~. a little nervous @mcollina