Closed cernec1999 closed 3 years ago
WARNING: DATA RACE Write at 0x000001073f8a by goroutine 10: main.main.func1() /home/ubuntu/ssh-honeypot/main.go:352 +0x24c Previous read at 0x000001073f8a by goroutine 7: main.spawnContainers() /home/ubuntu/ssh-honeypot/main.go:75 +0x2c Goroutine 10 (running) created at: main.main() /home/ubuntu/ssh-honeypot/main.go:350 +0x200 Goroutine 7 (running) created at: main.main() /home/ubuntu/ssh-honeypot/main.go:344 +0x170
programIsRunning variable is where the data race happens. Should we make atomic or lock it with the containerNamesLock mutex? I think I'll take the mutex approach here.