Skip to content

Commit

Permalink
fix: stop backoff when new starts
Browse files Browse the repository at this point in the history
  • Loading branch information
timsuchanek committed Apr 11, 2018
1 parent fef473f commit 12c41a3
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,9 @@ export class Playground extends React.PureComponent<Props & ReduxProps, State> {
this.setState({ schema: undefined })
}
let first = true
if (this.backoff) {
this.backoff.stop()
}
this.backoff = new Backoff(async () => {
if (first) {
await this.schemaGetter(props)
Expand Down

0 comments on commit 12c41a3

Please sign in to comment.