Skip to content

Commit

Permalink
Fixing "negative WaitGroup counter" bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
xiam committed Oct 12, 2014
1 parent 2c05db3 commit 7f4b9fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1396,14 +1396,14 @@ func TestPublishAndPSubscribe(t *testing.T) {
var clients int64
for i := 0; i < tests; i++ {
mu.Lock()
wg.Add(1)
clients, err = publisher.Publish("channel", i)
if err != nil {
t.Fatal("Publish(): ", err)
}
if clients < 1 {
t.Fatal("We should have at least one subscribed client.")
}
wg.Add(1)
mu.Unlock()
}

Expand Down

0 comments on commit 7f4b9fb

Please sign in to comment.