Insecure increment of numberOfFileWatchers & numberOfFolderWatchers++ · Issue #6 · andreaskoch/go-fswatch · GitHub
More Web Proxy on the site http://driver.im/
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi the increments should be surrounded with an Mutex to synchronize the write access to the variable. Because of concurrent go routines.
go-fswatch/file.go:
87
88 // increment watcher count
89: numberOfFileWatchers++
90
91 var modTime time.Time
go-fswatch/folder.go:
119
120 // increment watcher count
121: numberOfFolderWatchers++
122
123 for folderWatcher.wasStopped == false {
The text was updated successfully, but these errors were encountered: