pion / ice

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

Revert "Avoid allocation storing last active time" #699

Closed jech closed 3 months ago

jech commented 3 months ago

This reverts commit edb69295c04429931ede6a3df01d49520a1b31dc.

In that commit, active time was changed from time.Time to Unix time in order to avoid allocations. Unfortunately, that has the side effect of discarding the monotonic component of time.Time, and therefore makes our code vulnerable to stepping of the system clock.

This carries over #698 to v3. Fixes #697.

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 79.19%. Comparing base (899594c) to head (4636318).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #699 +/- ## ======================================= Coverage 79.19% 79.19% ======================================= Files 41 41 Lines 3739 3739 ======================================= Hits 2961 2961 Misses 547 547 Partials 231 231 ``` | [Flag](https://app.codecov.io/gh/pion/ice/pull/699/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/699/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pion) | `79.19% <100.00%> (ø)` | | | [wasm](https://app.codecov.io/gh/pion/ice/pull/699/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pion) | `22.13% <100.00%> (ø)` | | 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.