Skip to content

Commit 5ef2a9b

Browse files
authored
Null out 'watcher' variable when continuing to process events in linux (#90780)
1 parent e9ce3aa commit 5ef2a9b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/libraries/System.IO.FileSystem.Watcher/src/System/IO/FileSystemWatcher.Linux.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -596,6 +596,7 @@ private void ProcessEvents()
596596
// like IN_IGNORED. In any case, just ignore it... even if for some reason we
597597
// should have the value, there's little we can do about it at this point,
598598
// and there's no more processing of this event we can do without it.
599+
watcher = null;
599600
continue;
600601
}
601602
}
@@ -667,6 +668,7 @@ private void ProcessEvents()
667668
(isDir && ((_notifyFilters & NotifyFilters.DirectoryName) == 0) ||
668669
(!isDir && ((_notifyFilters & NotifyFilters.FileName) == 0))))
669670
{
671+
watcher = null;
670672
continue;
671673
}
672674

0 commit comments

Comments
 (0)