Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
private closeLobby() {
this.setState({ connected: false })
if (this.server) {
this.server.removeListener('close', this.disconnect)
this.server = undefined
}
if (this.tabObserver) {
this.tabObserver.destroy()
this.tabObserver = undefined
}
PlatformService.get().leaveLobby(this.lobbyId)
this.props.dispatch(NetActions.disconnect({ host: this.host }))
}