diff --git a/desk/lib/vitals.hoon b/desk/lib/vitals.hoon index da7489c8..8e1d916e 100644 --- a/desk/lib/vitals.hoon +++ b/desk/lib/vitals.hoon @@ -14,20 +14,13 @@ :: a ship is not guaranteed by %ames to know itself, so we fake it ?: =(ship peer) [%live time] - :: .^(* %ax /=//=/peers/[peer]) crashes if the peer is unknown, so we + :: .^(* /ax/=//=/peers/[peer]) crashes if the peer is unknown, so we :: check the source map beforehand and fake an %unborn if we can see :: a crash coming - =/ peers .^((map ^ship ?(%alien %known)) ~[%ax %$ %peers]) + =/ ames-peers=path /ax/(scot %p ship)//(scot %da time)/peers + =/ peers .^((map ^ship ?(%alien %known)) ames-peers) ?. (~(has by peers) peer) [%unborn time] - %- simplify-qos - .^ ship-state:ames - %ax - (scot %p ship) - %$ - (scot %da time) - %peers - (scot %p peer) - ~ - == + =/ pqos .^(ship-state:ames (snoc ames-peers (scot %p peer))) + (simplify-qos pqos) -- diff --git a/desk/ted/vitals/connection-check.hoon b/desk/ted/vitals/connection-check.hoon index b1e25972..7550c644 100644 --- a/desk/ted/vitals/connection-check.hoon +++ b/desk/ted/vitals/connection-check.hoon @@ -12,10 +12,10 @@ ^- form:m =+ !<([~ target=ship] arg) ;< our=@p bind:m get-our:io -;< now=@da bind:m get-time:io |^ :: early exit; check if we have live path to target ;< tqos=qos:ames bind:m (get-qos target) + ;< now=@da bind:m get-time:io ?: ?& ?=(%live -.tqos) (gth last-contact.tqos (sub now info-timeout:vitals)) == @@ -96,6 +96,7 @@ |= =pending:vitals =/ m (strand ,~) ^- form:m + ;< now=@da bind:m get-time:io %+ poke-our:io %vitals :- %update-status @@ -107,6 +108,7 @@ |= peer=ship =/ m (strand ,qos:ames) ^- form:m + ;< now=@da bind:m get-time:io ?: =(our peer) (pure:m [%live now]) ;< peers=(map ship ?(%alien %known)) bind:m