sippy / go-b2bua

The GO port of the Sippy B2BUA
BSD 2-Clause "Simplified" License
61 stars 16 forks source link

Terminate the goroutine on shutdown #17

Closed braams closed 1 month ago

braams commented 1 month ago

This goroutine could not terminate. This led to resource leakage. Now it will be terminated when Shutdown is called.

sobomax commented 1 month ago

@braams looks good, 👍would be nice to have a unit test case though! 🤔

sobomax commented 1 month ago

@braams thanks, merged. I've added UT to verify number of goroutines before and after shutdown. See https://github.com/sippy/go-b2bua/blob/13327d8e65c0c9dad9877bd490e144e492acc6fb/sippy/stm_test.go#L34

braams commented 1 month ago

Great! Thanks for the quick response!