From 809befb6fc30b9a681638540d0941d423a5cb2a8 Mon Sep 17 00:00:00 2001 From: Fang Date: Wed, 1 Apr 2020 23:13:57 +0200 Subject: [PATCH] clock: ensure launch is listening correctly In the wild, ships that were live pre-OS1 still had launch subscriptions open to the clock on the /tile path, instead of the currently-used /clocktile path. Additionally, launch state for the clock tile seemed incomplete. Here, we simply re-%add the clock to launch. Note that launch currently does not clean up old subscriptions on path change. For the pre-OS1 case, the old path is no longer in use, rendering the subscription harmless. For cases where the correct subscription was already in place, it'll print a %watch-wire-not-unique, but doesn't do any harm besides that. --- pkg/arvo/app/clock.hoon | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/pkg/arvo/app/clock.hoon b/pkg/arvo/app/clock.hoon index b63559d23..43c10dcdd 100644 --- a/pkg/arvo/app/clock.hoon +++ b/pkg/arvo/app/clock.hoon @@ -35,13 +35,21 @@ == :: bootstrapping to get %goad started OTA :: -++ on-save !>(%2) +++ on-save !>(%3) ++ on-load |= old-state=vase - =/ old !<(?(~ %1 %2) old-state) + ^- (quip card _this) + =/ old !<(?(~ %1 %2 %3) old-state) =^ cards this - ?: ?=(%2 old) + ?: ?=(%3 old) `this + ?: ?=(%2 old) + :: ensure launch is set up to listen to us correctly + :: + =/ launcha + [%launch-action !>([%add %clock /clocktile '/~clock/js/tile.js'])] + :_ this + [%pass /clock %agent [our.bowl %launch] %poke launcha]~ :_ this :_ ~ [%pass /behn %arvo %b %wait +(now.bowl)] ::