mirror of
https://github.com/urbit/shrub.git
synced 2024-11-28 22:33:06 +03:00
pull-hook: no-op on double add
If we receive an %add poke for a resource we are already pulling, no-op instead of crashing. This should prevent crashes upon repulling a resource after a breach of the host.
This commit is contained in:
parent
516423b853
commit
f658d99c76
@ -225,7 +225,8 @@
|
|||||||
++ add
|
++ add
|
||||||
|= [=ship =resource]
|
|= [=ship =resource]
|
||||||
~| resource
|
~| resource
|
||||||
?< (~(has by tracking) resource)
|
?: (~(has by tracking) resource)
|
||||||
|
[~ state]
|
||||||
=. tracking
|
=. tracking
|
||||||
(~(put by tracking) resource ship)
|
(~(put by tracking) resource ship)
|
||||||
:_ state
|
:_ state
|
||||||
|
Loading…
Reference in New Issue
Block a user