ames: fix no-op for messages on closing bones
++ 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)
::
++ 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
