atomicdata-dev / atomic-data-browser

This repo is no longer used! Code is moved to Atomic-Server
https://github.com/atomicdata-dev/atomic-server/issues
MIT License
55 stars 9 forks source link

Resources subscribed over websocket never unsubscribed [Optimization] #311

Open adileo opened 1 year ago

adileo commented 1 year ago

It looks like that store.unSubscribeWebSocket is never called.

This means that the client once a hook like useResource is used it will keep listening over websocket for updates that no one reads.

Fix proposal:

Any side issues that could arise from this?

joepio commented 1 year ago

Thanks for the suggestion!

Some time ago, this was the actual behavior. However, this had the following issue:

We can deal with this in two ways:

So unfortunately, I think it's better to keep things the way they are now.