ames: fix no-op for messages on closing bones

This commit is contained in:
Ted Blackman 2022-08-10 20:18:57 +03:00
parent 20ccac22a2
commit 6b836bb56d

View File

@ -2417,6 +2417,15 @@
++ on-memo
|= [=bone payload=* valence=?(%plea %boon)]
^+ peer-core
?: ?& (~(has in closing.peer-state) bone)
!=(payload [%$ /flow %cork ~])
==
~> %slog.0^leaf/"ames: ignoring message on closing bone {<bone>}"
peer-core
?: (~(has in corked.peer-state) bone)
~> %slog.0^leaf/"ames: ignoring message on corked bone {<bone>}"
peer-core
::
=/ =message-blob (dedup-message (jim payload))
=. peer-core (run-message-pump bone %memo message-blob)
::
@ -2589,14 +2598,6 @@
++ run-message-pump
|= [=bone task=message-pump-task]
^+ peer-core
?: ?& (~(has in closing.peer-state) bone)
!=(task [%memo ^~((jim [%$ /flow [%cork ~]]))])
==
~> %slog.0^leaf/"ames: activity on closing bone {<bone>}"
peer-core
?: (~(has in corked.peer-state) bone)
~> %slog.0^leaf/"ames: activity on corked bone {<bone>}"
peer-core
:: pass .task to the |message-pump and apply state mutations
::
=/ =message-pump-state