Be more robust with elapsed time counter 0.4.0
authorJeremy Stanley <fungi@yuggoth.org>
Mon, 26 Apr 2021 01:21:45 +0000 (01:21 +0000)
committerJeremy Stanley <fungi@yuggoth.org>
Mon, 26 Apr 2021 01:21:45 +0000 (01:21 +0000)
Stress testing identified a rare startup race if a user connected
before the elapsed time counter was initialized. The odds of
encountering this in the wild are close to nonexistent, but it was
introducing occasional test failures.

Solve the race by reordering the actions taken on each pulse, so
that the counter is initialized before the listening socket is
created. Also force all access to the counter through setter/getter
methods and wrap in try/except to always return a value and properly
create the counter and containing element if it doesn't yet exist.


No differences found