ravendb / ravendb-nodejs-client

RavenDB node.js client
MIT License
63 stars 32 forks source link

Changes Observable uneven connection state count prematurely closes changes connection #252

Closed nemanja-tosic closed 3 years ago

nemanja-tosic commented 3 years ago

Note lines 36 and 62 - the inc() method only increments on data event, while the dec() method decrements on both data and error. This causes the connection state to close the connection, even though there are clients still listening to data.

https://github.com/ravendb/ravendb-nodejs-client/blob/56f9f0cae2f260d5c29f81f8f0f85fc5397fcc22/src/Documents/Changes/ChangesObservable.ts#L22-L84

ml054 commented 3 years ago

Hi, @nemanja-tosic

Thank you for reporting this. I've moved this issue to our official bug tracker: https://issues.hibernatingrhinos.com/issue/RDBC-435