iriscouch / follow

Very stable, very reliable, NodeJS CouchDB _changes follower

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

timeOut objects not cleared when using trycatch > 1.5.11 / hookit > 0.1.1

mickaeltr opened this issue · comments

Hello,

I am not sure if that issue should be submitted here, but as I have spent over a day trying to figure out what my bug was, I think it at least deserved to be documented. :)

So, I use follow 0.12.1 for tracking changes. I am also using trycatch, which depends on hookit. After I updated from trycatch 1.5.11 to 1.5.19, follow suddenly stopped working, always breaking with "Timeout confirming database".

I figured out that a timeOut object was never cleared, because the setTimeOut was returning undefined. Further analysis showed that trycatch recently upgraded the hookit version, which seems to break the setTimeOut function used in follow.

Downgrading to trycatch 1.5.11 and enforcing hookit to 0.1.1 seems to do the trick for now.

@mickaeltr this is probably due to the fact that hookit is causing side-effects because it is overrding global functionality and making certain assumptions about it. I would post an issue with the author of the library :).

It looks like it has been fixed already in hookit 1.1.2 (or 1.1.3).
Sorry for the disturbance.