don't subscribe to channels if fetching stats fail
This commit is contained in:
parent
24e30a6e72
commit
7a5e39f078
1 changed files with 7 additions and 0 deletions
|
@ -25,7 +25,14 @@ export default class App extends Component {
|
|||
}
|
||||
|
||||
subscribeToChannels () {
|
||||
if (this.state.metrics == null) {
|
||||
// fetching state failed, bail
|
||||
log('not going to subscribe to realtime updates due to fetch failure')
|
||||
return
|
||||
}
|
||||
|
||||
const { graph } = this.state.metrics
|
||||
|
||||
const channels = Object.keys(graph).reduce(
|
||||
(channels, name) => [...channels, `latency:${name}`, `status:${name}`],
|
||||
[]
|
||||
|
|
Loading…
Reference in a new issue