diff options
Diffstat (limited to 'worker.go')
| -rw-r--r-- | worker.go | 11 |
1 files changed, 2 insertions, 9 deletions
@@ -7,7 +7,6 @@ import ( "os" "path/filepath" "strings" - "sync" "git.sr.ht/~shulhan/pakakeh.go/lib/ini" ) @@ -19,8 +18,7 @@ type worker struct { reportq chan ScanReport - Reports Reports - reportsMutex sync.Mutex + Reports Reports } func newWorker(configDir string) (wrk *worker, err error) { @@ -114,12 +112,7 @@ func (wrk *worker) start(updateq chan<- struct{}) { if !ok { break } - - wrk.reportsMutex.Lock() - var svcReport = wrk.Reports.Services[scanReport.Name] - svcReport.Store(scanReport) - wrk.reportsMutex.Unlock() - + wrk.Reports.Store(scanReport) updateq <- struct{}{} } } |
