How to destroy firebase ref in node

后端 未结 2 509
闹比i
闹比i 2020-12-10 05:52

If I do this in node:

console.log(\'1\');
console.log(\'2\');

outputs:

1
2

And the process ends.

2条回答
  •  感动是毒
    2020-12-10 06:31

    [Engineer at Firebase] Currently, instantiating the Firebase client with new Firebase(...) will create a long-lived persistent connection that keeps the Node.js process alive.

    This is admittedly not ideal for a bunch of use cases, and we have some work to do here to ensure that the process exits cleanly and automatically when there are no outstanding Firebase listeners or pending writes to the server, but it's been medium / low priority. I'd expect a "fix" to be released by Q2 '15, hopefully Q1.

提交回复
热议问题