Set running = false before the asynchronous stop operation

This commit is contained in:
Ash Wilson
2017-06-22 08:39:36 -04:00
parent 80a9126fdb
commit 7ec79a00fc

View File

@@ -111,9 +111,9 @@ class NativeWatcher {
if (!this.running) {
return
}
this.running = false
await this.watcher.stop()
this.running = false
this.emitter.emit('did-stop')
}