oortcloud / node-ddp-client

A callback style DDP (Meteor's Distributed Data Protocol) node client.
Other
263 stars 80 forks source link

Remove connected and failed listeners on close #48

Closed nnevala closed 9 years ago

nnevala commented 9 years ago

I noticed the connected and failed event listeners are not removed when connection is closed, causing them to pile up if connect/close cycle is called multiple times.

This fixes the issue by simply removing the listeners when close() is called.

emgee3 commented 9 years ago

Thanks! Merged and published.