SIGN IN SIGN UP

FileWatching: fix PollingFileWatcher stuck after uv_fs_stat failure

In the timer callback of PollingFileWatcher, `pfw.active` was
unconditionally set to `true` after calling `uv_fs_stat`, even when the
call failed. Since the callback (`uv_fspollcb`) only fires on success,
`active` would never be reset to `false`, permanently stalling the
watcher. Additionally, `preserve_handle` was called but never balanced
by `unpreserve_handle` on error.

Fix by only setting `active = true` when the stat request succeeds, and
calling `unpreserve_handle` on failure before notifying the error.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
K
Kristoffer Carlsson committed
0d1054c1ff14d2db8ebc9daed5f131f6c826cc8f
Parent: 29bcd2e