So, of course the process bails whenever the Node process exits or is stopped. But if the Watcher is stopped without the process bailing, I'm not sure if the keep-alive tick ever stops going.
Since the ticker relies on setInterval instead of setTimeout, it needs to be cleared with clearInterval to stop it. But in tick(), if the watcher is in a stopped state, there is nothing that causes the watcher to actually stop -- no call to stop(), no clearInterval, nothing.
So, of course the process bails whenever the Node process exits or is stopped. But if the Watcher is stopped without the process bailing, I'm not sure if the keep-alive tick ever stops going.
Relevant source code
Since the ticker relies on
setInterval
instead ofsetTimeout
, it needs to be cleared withclearInterval
to stop it. But intick()
, if the watcher is in astopped
state, there is nothing that causes the watcher to actually stop -- no call tostop()
, noclearInterval
, nothing.