pion / ice

A Go implementation of ICE
https://pion.ly/
MIT License
424 stars 158 forks source link

Cleanly close agent goroutines #706

Closed edaniels closed 1 month ago

edaniels commented 1 month ago

This ensures no goroutines are running when an ICE agent closes. I'd also like to backport this into v2 so that webrtc/v3 can get it.

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 75.00000% with 9 lines in your changes missing coverage. Please review.

Project coverage is 79.07%. Comparing base (2a9fdb5) to head (72c7732).

Files Patch % Lines
agent_handlers.go 67.85% 9 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #706 +/- ## ========================================== - Coverage 79.19% 79.07% -0.12% ========================================== Files 41 41 Lines 3739 3771 +32 ========================================== + Hits 2961 2982 +21 - Misses 547 557 +10 - Partials 231 232 +1 ``` | [Flag](https://app.codecov.io/gh/pion/ice/pull/706/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pion) | Coverage Δ | | |---|---|---| | [go](https://app.codecov.io/gh/pion/ice/pull/706/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pion) | `79.07% <75.00%> (-0.12%)` | :arrow_down: | | [wasm](https://app.codecov.io/gh/pion/ice/pull/706/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pion) | `22.23% <30.55%> (+0.10%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pion#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

davidzhao commented 1 month ago

@paulwe tagging you on this as it closely matches with your initial comments about not leaving behind rogue goroutines