mirror of
https://github.com/urbit/shrub.git
synced 2024-12-25 04:52:06 +03:00
ames: correct behaviour for %yawn
This commit is contained in:
parent
479e060e32
commit
c16aaae201
@ -2574,14 +2574,9 @@
|
|||||||
=. keens.scry (put:orm keens.scry keen-id keen-state)
|
=. keens.scry (put:orm keens.scry keen-id keen-state)
|
||||||
ke-abet:ke-start:(ke-abed:keen-core path)
|
ke-abet:ke-start:(ke-abed:keen-core path)
|
||||||
::
|
::
|
||||||
:: TODO: fix, only cancel on when no more subscribers
|
|
||||||
++ pe-yawn
|
++ pe-yawn
|
||||||
|= =path
|
|= =path
|
||||||
=/ keen-id=@ud (~(got by order.scry) path)
|
ke-abet:ke-unsub:(ke-abed:keen-core path)
|
||||||
=. order.scry (~(del by order.scry) path)
|
|
||||||
=. keens.scry +:(del:orm keens.scry keen-id)
|
|
||||||
~& yawn/path
|
|
||||||
pe-core
|
|
||||||
::
|
::
|
||||||
++ pe-hear
|
++ pe-hear
|
||||||
|= [=lane =packet]
|
|= [=lane =packet]
|
||||||
@ -2620,7 +2615,10 @@
|
|||||||
=, keen
|
=, keen
|
||||||
:: num-fragments is 0 when unknown (i.e. no response
|
:: num-fragments is 0 when unknown (i.e. no response
|
||||||
:: yet)
|
:: yet)
|
||||||
|
:: if no-one is listening, kill request
|
||||||
|
?| =(~ listeners.keen)
|
||||||
&(!=(0 num-fragments) =(num-fragments num-received))
|
&(!=(0 num-fragments) =(num-fragments num-received))
|
||||||
|
==
|
||||||
?: gone
|
?: gone
|
||||||
ke-abet-gone
|
ke-abet-gone
|
||||||
=. ke-core ke-set-wake
|
=. ke-core ke-set-wake
|
||||||
@ -2764,6 +2762,11 @@
|
|||||||
++ ke-sub
|
++ ke-sub
|
||||||
=. listeners.keen (~(put in listeners.keen) duct)
|
=. listeners.keen (~(put in listeners.keen) duct)
|
||||||
ke-core
|
ke-core
|
||||||
|
:: scry is autocancelled in +ke-abet if no more listeners
|
||||||
|
::
|
||||||
|
++ ke-unsub
|
||||||
|
=. listeners.keen (~(del in listeners.keen) duct)
|
||||||
|
ke-core
|
||||||
::
|
::
|
||||||
++ ke-emit
|
++ ke-emit
|
||||||
|= =hoot
|
|= =hoot
|
||||||
@ -2913,7 +2916,8 @@
|
|||||||
~| [%fine %invalid-namespace-path path]
|
~| [%fine %invalid-namespace-path path]
|
||||||
(need (de-omen path))
|
(need (de-omen path))
|
||||||
=/ peer-core (pe-abed:fine-peer p.bem.omen)
|
=/ peer-core (pe-abed:fine-peer p.bem.omen)
|
||||||
?~ peer-core !!
|
?~ peer-core
|
||||||
|
~|(%no-ship-for-yawn !!)
|
||||||
pe-abet:(pe-yawn:u.peer-core path)
|
pe-abet:(pe-yawn:u.peer-core path)
|
||||||
::
|
::
|
||||||
++ on-bide
|
++ on-bide
|
||||||
|
Loading…
Reference in New Issue
Block a user