Skip to content

Resources subscribed over websocket never unsubscribed [Optimization] #311

Description

@adileo

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:

  • within store.unsubscribe() check if callbackArray is empty then trigger a store.unSubscribeWebSocket

Any side issues that could arise from this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions