[FIX] Connecting stream listener not being cleared (#3008)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
This commit is contained in:
parent
6798f039f3
commit
fc52286bfa
|
@ -196,6 +196,10 @@ const RocketChat = {
|
|||
clearTimeout(this.connectTimeout);
|
||||
}
|
||||
|
||||
if (this.connectingListener) {
|
||||
this.connectingListener.then(this.stopListener);
|
||||
}
|
||||
|
||||
if (this.connectedListener) {
|
||||
this.connectedListener.then(this.stopListener);
|
||||
}
|
||||
|
@ -243,7 +247,7 @@ const RocketChat = {
|
|||
|
||||
sdkConnect();
|
||||
|
||||
this.connectedListener = this.sdk.onStreamData('connecting', () => {
|
||||
this.connectingListener = this.sdk.onStreamData('connecting', () => {
|
||||
reduxStore.dispatch(connectRequest());
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue