断开连接时,deepstream 客户端是否取消订阅?

Does deepstream clients unsubscribe when disconnecting?

来自文档:

The listen-callback is called with isSubscribed = true once a matching event is subscribed to for the first time and with isSubscribed = false once the last subscriber for a matching event unsubscribes.

如果浏览器客户端突然断开连接,deepstream 最终会自动取消订阅吗?

是的,会的。失去连接将自动删除服务器端对该连接的所有订阅,并在此过程中通知监听机制。

事实上,即使客户端在连接丢失期间只是暂时断开连接,其所有订阅也会在重新连接后被删除并重新建立。