From: Jeremy Stanley Date: Mon, 26 Apr 2021 01:21:45 +0000 (+0000) Subject: Be more robust with elapsed time counter X-Git-Tag: 0.4.0^0 X-Git-Url: https://mudpy.org/gitweb?p=mudpy.git;a=commitdiff_plain;h=97777484a98e7b81bdf29033c26aae3de5ed2fa0;hp=97777484a98e7b81bdf29033c26aae3de5ed2fa0 Be more robust with elapsed time counter 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. ---