Removed wg from worker start. Fixed various races.

This commit is contained in:
Jay
2026-04-20 17:54:03 -04:00
parent aaf8571b9f
commit 2c7b22b3d9
8 changed files with 72 additions and 43 deletions
+4 -1
View File
@@ -189,7 +189,10 @@ func (p *Pool) Connect(id string) error {
}
p.wg.Add(1)
go worker.Start(pool, &p.wg)
go func() {
worker.Start(pool)
p.wg.Done()
}()
p.peers[id] = &Peer{id: id, worker: worker}