Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(760)

Unified Diff: pkg/watcher/lib/src/directory_watcher/polling.dart

Issue 68253010: Be sure we don't forward an error to a closed event stream. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Un-mark the test as flaky Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/watcher/lib/src/directory_watcher/polling.dart
diff --git a/pkg/watcher/lib/src/directory_watcher/polling.dart b/pkg/watcher/lib/src/directory_watcher/polling.dart
index 0e190b02bad943be2b299fd0eae227c80a8b39d1..e50a0c05c148e1601088f94c074e390b9bed0454 100644
--- a/pkg/watcher/lib/src/directory_watcher/polling.dart
+++ b/pkg/watcher/lib/src/directory_watcher/polling.dart
@@ -72,7 +72,9 @@ class _PollingDirectoryWatcher implements ManuallyClosedDirectoryWatcher {
_PollingDirectoryWatcher(this.directory, this._pollingDelay) {
_filesToProcess = new AsyncQueue<String>(_processFile,
- onError: _events.addError);
+ onError: (e, stackTrace) {
+ if (!_events.isClosed) _events.addError(e, stackTrace);
+ });
_poll();
}
« pkg/watcher/lib/src/async_queue.dart ('K') | « pkg/watcher/lib/src/async_queue.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698