Do not disconnect WebSocket when NetworkIndicator on componentWillUnmount (#2368)
* Do not disconnect websocket when networkIndicator unmounts * feedback review
This commit is contained in:
parent
736a955be8
commit
aa9fef955f
1 changed files with 1 additions and 6 deletions
|
|
@ -112,16 +112,11 @@ export default class NetworkIndicator extends PureComponent {
|
|||
componentWillUnmount() {
|
||||
this.mounted = false;
|
||||
|
||||
const {closeWebSocket, stopPeriodicStatusUpdates} = this.props.actions;
|
||||
|
||||
this.networkListener.removeEventListener();
|
||||
|
||||
AppState.removeEventListener('change', this.handleAppStateChange);
|
||||
|
||||
closeWebSocket();
|
||||
stopPeriodicStatusUpdates();
|
||||
|
||||
clearTimeout(this.connectionRetryTimeout);
|
||||
this.connectionRetryTimeout = null;
|
||||
}
|
||||
|
||||
connect = (displayBar = false) => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue