From bee0b5803a8e87d3412387bdf1a2c66b0ee1b0d7 Mon Sep 17 00:00:00 2001 From: Ted Blackman Date: Wed, 4 Dec 2019 13:43:07 -0500 Subject: [PATCH] ames: don't crash on missing queued larval event --- bin/solid.pill | 4 ++-- pkg/arvo/sys/vane/ames.hoon | 10 ++++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/bin/solid.pill b/bin/solid.pill index ea4c6887d..4fbcf3cf5 100644 --- a/bin/solid.pill +++ b/bin/solid.pill @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8185eba8c879ae9f5c6572864426362d72e73376ada057daed03726e5dac9d1d -size 9506882 +oid sha256:5b4c64d4be73ca2331d8f846f83a431c57143fafc85b6f96beeee6618d444be5 +size 9510112 diff --git a/pkg/arvo/sys/vane/ames.hoon b/pkg/arvo/sys/vane/ames.hoon index e1d718b68..55d6fc13e 100644 --- a/pkg/arvo/sys/vane/ames.hoon +++ b/pkg/arvo/sys/vane/ames.hoon @@ -894,9 +894,15 @@ [~ larval-gate] :: if crashed, print, dequeue, and set next drainage timer :: - :: TODO: cleanup duplicate iteration logic - :: ?^ error.sign + :: .queued-events should never be ~ here, but if it is, don't crash + :: + ?: =(~ queued-events) + =/ =tang [leaf/"ames: cursed metamorphosis" u.error.sign] + =/ moves [duct %pass /larva-crash %d %flog %crud %larva tang]~ + [moves adult-gate] + :: dequeue and discard crashed event + :: =. queued-events +:~(get to queued-events) :: .queued-events has been cleared; metamorphose ::