mirror of
https://github.com/urbit/shrub.git
synced 2024-12-19 00:13:12 +03:00
gall: handle %kicks for nonexistent subscriptions
This commit is contained in:
parent
a288d455c3
commit
3f7f4dbd5a
@ -2504,7 +2504,6 @@
|
||||
(on-hear [message-num fragment-num=p.ack-meat]:task)
|
||||
::
|
||||
%|
|
||||
~& [current.state message+message-num:task]
|
||||
=/ cork=?
|
||||
=/ top-live
|
||||
(pry:packet-queue:*make-packet-pump live.packet-pump-state.state)
|
||||
|
@ -1493,9 +1493,13 @@
|
||||
::
|
||||
?: =(~ agent-wire)
|
||||
on-missing
|
||||
=/ has-nonce=(unit @ud) (slaw %ud (head agent-wire))
|
||||
?: &(?=(~ has-nonce) ?=(%kick -.sign))
|
||||
on-weird-kick
|
||||
:: pop nonce off .agent-wire and match against stored subscription
|
||||
::
|
||||
=: nonce (slav %ud (head agent-wire))
|
||||
?> ?=(^ has-nonce)
|
||||
=: nonce u.has-nonce
|
||||
agent-wire (tail agent-wire)
|
||||
==
|
||||
=/ got (~(get by outbound.watches.yoke) sub-key)
|
||||
@ -1552,6 +1556,14 @@
|
||||
>wire=wire<
|
||||
==
|
||||
::
|
||||
++ on-weird-kick
|
||||
%. run-sign
|
||||
%- slog :~
|
||||
leaf+"{<agent-name>}: got %kick for nonexistent subscription"
|
||||
leaf+"{<dock>}: {<agent-wire>}"
|
||||
>wire=wire<
|
||||
==
|
||||
::
|
||||
++ on-bad-nonce
|
||||
|= stored-nonce=@
|
||||
%. ap-core
|
||||
|
Loading…
Reference in New Issue
Block a user