stianeikeland / node-etcd

:satellite: Etcd client for nodejs
BSD 3-Clause "New" or "Revised" License
259 stars 85 forks source link

unref timers #87

Open djMax opened 5 years ago

djMax commented 5 years ago

The timer created here:

https://github.com/stianeikeland/node-etcd/blob/1bb5f4da071ee245dbbb47e991dfecdeb2830764/src/watcher.coffee#L93

Is not unref'ed or returned, so there is no way to cleanly end a process that is waiting on this timer. I would prefer that it was just unref'ed, but at worst it needs to be returned so the caller can unref it. Or an option of some sort... I can make a PR to unref it if that's the desired approach

djMax commented 5 years ago

(Never mind, returning it won't help because it's an internal method. So it would need to be an instance var and cleaned up as part of watcher destruction)