summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2020-11-30 11:00:46 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2020-11-30 11:00:46 +0100
commit394d284f68fbc8a724fae25a0d2d9492a9b4d835 (patch)
tree4334dd2af62c4e38ee913c49076328b2326c99b4
parent0b93a02588af84e00529e6f0c2221af0601c2bd8 (diff)
downloaddabmux-394d284f68fbc8a724fae25a0d2d9492a9b4d835.tar.gz
dabmux-394d284f68fbc8a724fae25a0d2d9492a9b4d835.tar.bz2
dabmux-394d284f68fbc8a724fae25a0d2d9492a9b4d835.zip
Common 2ff8a87: ClockTAI: download before expiry
-rw-r--r--lib/ClockTAI.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ClockTAI.cpp b/lib/ClockTAI.cpp
index 2d48d36..626140e 100644
--- a/lib/ClockTAI.cpp
+++ b/lib/ClockTAI.cpp
@@ -350,7 +350,7 @@ int ClockTAI::get_valid_offset()
#endif
const auto cache_state = parse_bulletin(cache_bulletin);
- if (cache_state.usable()) {
+ if (cache_state.usable() and not cache_state.expires_soon()) {
m_bulletin = cache_bulletin;
offset = cache_state.offset;
offset_valid = true;