jperkin / node-rpio

Raspberry Pi GPIO library for node.js
858 stars 124 forks source link

Fix removing for listeners to new event handler #77

Closed Wouter0100 closed 5 years ago

Wouter0100 commented 5 years ago

In commit 0e5886ad71d4cc58b935d86eedf62c2e4325cb4e a new event listener was introduced - where the poll function was not properly updated to remove active poll listeners.

Should fix #56

jperkin commented 5 years ago

Thanks! It looks like .off() was added as an alias only in v10.x, and this module tries hard to support older versions of node. Could you change it to use the generic .removeListener() and check it still works?

Wouter0100 commented 5 years ago

Thanks for the fast response and good catch, @jperkin! I've updated and tested it :+1:

Wouter0100 commented 5 years ago

Hey @jperkin, any way to get this merged? Would be nice if I'm able to release in prod :). Thanks!

jperkin commented 5 years ago

Sorry, I was waiting for confirmation of testing in #56 but it looks like I missed the update. I'll get this in tomorrow.

jperkin commented 5 years ago

Merged and released in 0.9.23, thanks!