取消订阅后移除Subscription
This commit is contained in:
parent
50f465b24f
commit
9ef7db9925
@ -66,6 +66,10 @@ export class CentrifugeMessagingClient extends MessageClient {
|
||||
.on('subscribed', (ctx) => {
|
||||
console.log('订阅centrifuge服务消息成功', destination, ctx);
|
||||
})
|
||||
.on('unsubscribed', (ctx) => {
|
||||
this.cli.removeSubscription(sub);
|
||||
console.log('取消订阅centrifuge服务消息成功', destination, ctx);
|
||||
})
|
||||
.subscribe();
|
||||
} else {
|
||||
sub.subscribe();
|
||||
|
Loading…
Reference in New Issue
Block a user