CyCoreSystems / ari

Golang Asterisk REST Interface (ARI) library
Apache License 2.0
180 stars 74 forks source link

Resolved issue where waitgroup Done could have been called twice (resulting in an negative waitgroup count) #163

Closed daninmadison closed 10 months ago

daninmadison commented 10 months ago

Because a previous loop could have resulted in the sync.Once wg.Done being called, my earlier commit this morning could have resulted in the wg.Done being called twice.

This corrects the issue by correctly using the sync.Once signal for any wg.Done inside the listen goroutine.


This change is Reviewable