pion / ice

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

Refine TCPMux memory usage #653

Closed cnderrauber closed 6 months ago

cnderrauber commented 6 months ago

Reduce read buf of first stun message. Add timeout to read first message to clean interrupted connection earlier. Add alive duration for gather to access connection created from stun bind, avoid connection leak from the malicious client.

codecov[bot] commented 6 months ago

Codecov Report

Attention: 10 lines in your changes are missing coverage. Please review.

Comparison is base (ab18a94) 78.60% compared to head (7b5b502) 78.85%.

Files Patch % Lines
tcp_mux.go 72.22% 6 Missing and 4 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #653 +/- ## ========================================== + Coverage 78.60% 78.85% +0.24% ========================================== Files 42 42 Lines 4394 4431 +37 ========================================== + Hits 3454 3494 +40 + Misses 725 721 -4 - Partials 215 216 +1 ``` | [Flag](https://app.codecov.io/gh/pion/ice/pull/653/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/653/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pion) | `78.85% <80.00%> (+0.24%)` | :arrow_up: | | [wasm](https://app.codecov.io/gh/pion/ice/pull/653/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pion) | `23.23% <80.00%> (+0.87%)` | :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.