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" #698

Closed jech closed 3 months ago

jech commented 3 months ago

This reverts commit e1c2d85530f0f9e96935c3598cc68b6c596c1a39.

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.

Fixes #697

codecov[bot] commented 3 months ago

Codecov Report

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

:exclamation: No coverage uploaded for pull request base (v2@da3175f). Click here to learn what that means.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## v2 #698 +/- ## ===================================== Coverage ? 79.55% ===================================== Files ? 42 Lines ? 3581 Branches ? 0 ===================================== Hits ? 2849 Misses ? 518 Partials ? 214 ``` | [Flag](https://app.codecov.io/gh/pion/ice/pull/698/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/698/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pion) | `79.55% <100.00%> (?)` | | | [wasm](https://app.codecov.io/gh/pion/ice/pull/698/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pion) | `22.82% <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.