Bump version to 0.6.4 for testing, integrate software updater auto-check into PacketDecoder decode path and main loop.
This commit is contained in:
parent
54c2c945e0
commit
c8166b2db1
5 changed files with 31 additions and 1 deletions
|
@ -76,6 +76,9 @@ public:
|
|||
|
||||
/**
|
||||
* Check for updates now regardless of last check time or version
|
||||
*
|
||||
* This only starts a check if one is not in progress. Otherwise it does
|
||||
* nothing.
|
||||
*/
|
||||
inline void checkNow()
|
||||
{
|
||||
|
@ -87,6 +90,17 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check for updates now if it's been longer than ZT_UPDATE_MAX_INTERVAL
|
||||
*
|
||||
* This is called periodically from the main loop.
|
||||
*/
|
||||
inline void checkIfMaxIntervalExceeded(uint64_t now)
|
||||
{
|
||||
if ((now - _lastUpdateAttempt) >= ZT_UPDATE_MAX_INTERVAL)
|
||||
checkNow();
|
||||
}
|
||||
|
||||
/**
|
||||
* Pack three-component version into a 64-bit integer
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue