Skip to content

Commit

Permalink
fix: Keep watching local changes after OS suspension
Browse files Browse the repository at this point in the history
  • Loading branch information
taratatach committed Jan 14, 2025
1 parent e8f342e commit b36964f
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions core/local/chokidar/watcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,10 +227,6 @@ class LocalWatcher {
async resume() {
log.info('Resuming watcher...')

if (this.watcher && this.watcher.getWatched().length === 0) {
this.watcher.add('.')
}

// Flush previously buffered events
this.buffer.flush()
// Restart flushes loop
Expand All @@ -242,11 +238,6 @@ class LocalWatcher {

// Stop flushes loop but keep buffered events
this.buffer.switchMode('idle')

// Stop underlying Chokidar watcher
if (this.watcher) {
this.watcher.unwatch('.')
}
}

async stop(force /*: ?bool */ = false) {
Expand Down

0 comments on commit b36964f

Please sign in to comment.