ames: don't set new timer if we woke up too early

Otherwise if we end up having multple outstanding timers, they never
coalesce to a single timer.
This commit is contained in:
Philip Monk 2020-05-27 17:38:18 -07:00
parent d0b4d5a02e
commit ff01a1ea04
No known key found for this signature in database
GPG Key ID: B66E1F02604E44EC

View File

@ -1669,6 +1669,11 @@
peer-core
?~ next-wake.packet-pump-state.u.message-pump-state
peer-core
:: If we crashed because we woke up too early, assume another
:: timer is already set.
::
?: (lth now.channel u.next-wake.packet-pump-state.u.message-pump-state)
peer-core
::
=/ =wire (make-pump-timer-wire her.channel bone)
(emit duct %pass wire %b %wait (add now.channel ~s30))