ChaseCares / AirGradient-InfluxDB

AirGradient Pushing to InfluxDB or MQTT
MIT License
9 stars 3 forks source link

Fix potential millis() rollover issue with cache #5

Closed Afluttera closed 3 years ago

Afluttera commented 3 years ago

During long run times (after every 49~ days) the millis() call rollover could leave the cache in a state where it holds its value essentially permanently, unless you get lucky, because m_lastAccess + m_ttl hasn't rolled over, but is still very close to the unsigned long max value.