# HG changeset patch # User Ted Unangst # Date 1722629550 14400 # Fri Aug 02 16:12:30 2024 -0400 # Node ID 4f2ab87acfea0dc935b725a22ce14e3cacf08c73 # Parent 5c4e6925be81f0e92529685b75925328912b3c5e consistently defer wg.Done diff --git a/activity.go b/activity.go --- a/activity.go +++ b/activity.go @@ -1674,6 +1674,7 @@ } wg.Add(1) go func() { + defer wg.Done() box, _ := boxofboxes.Get(a) mtx.Lock() if box != nil && useshared && box.Shared != "" { @@ -1682,7 +1683,6 @@ rcpts[a] = true } mtx.Unlock() - wg.Done() }() } wg.Wait() diff --git a/fun.go b/fun.go --- a/fun.go +++ b/fun.go @@ -91,6 +91,7 @@ } handlers.Add(1) go func() { + defer handlers.Done() h.Username, h.Handle = handles(h.Honker) if !local { short := shortname(userid, h.Honker) @@ -128,7 +129,6 @@ if h.Oonker != "" { _, h.Oondle = handles(h.Oonker) } - handlers.Done() }() h.Precis = demoji(h.Precis) h.Noise = demoji(h.Noise)