The broken demo is on master
npm install
version of rxjs is RC1 (issue exists on all release candidates)
Start the server with npm start
Then run the demo with npm run demo
CTRL^C
the demo process to drop all the connections at once
watch the server call stack blow up.
If you lower the demo to less clients (like 100), you will notice the server does not blow up but not all events appear to be firing (only 3-4 client close messages log), this could be related or a different issue in itself.
Now switch to the branch working
Run npm install
to run the demo with Beta 12
Same as above start the server with npm start
Then run the demo with npm run demo
CTRL^C
the demo process to drop all the connections at once and everything works as expected, this time however we were able to start and drop 4k connections (this was run on a 2015 MBP, you might hit file descriptor limits before this depending on your OS/host).
I discovered this issue when trying to use rxjs with a tcp socket server. I could not track down the commit that introduce this regression, it could have been something specific to takeUntil
however I think it is related to a change with Subscription
or how disposal works?