调整state为connecting时的unsub
This commit is contained in:
parent
784f8fb0d5
commit
0b27c8d563
|
|
@ -258,7 +258,7 @@ export class SubScriber<ED extends EntityDict & BaseEntityDict> extends Feature
|
|||
event => unset(this.eventMap, event)
|
||||
);
|
||||
|
||||
if (this.socketState === 'connected') {
|
||||
if (this.socketState === 'connected' || this.socketState === 'connecting') {
|
||||
this.socket!.emit('unsub', events);
|
||||
if (Object.keys(this.eventMap).length === 0) {
|
||||
this.socket!.disconnect();
|
||||
|
|
|
|||
Loading…
Reference in New Issue