mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-11-29 04:04:02 +03:00
treaty: prevent networking loops
This commit is contained in:
parent
446e53318a
commit
029f839be5
@ -196,9 +196,13 @@
|
|||||||
++ take-treaty
|
++ take-treaty
|
||||||
|= =desk
|
|= =desk
|
||||||
?+ -.sign (on-agent:def wire sign)
|
?+ -.sign (on-agent:def wire sign)
|
||||||
|
::
|
||||||
|
:: rewatch only if we aren't source
|
||||||
|
:: this would cause a potential kick-rewatch loop otherwise
|
||||||
::
|
::
|
||||||
%kick
|
%kick
|
||||||
:_ this
|
:_ this
|
||||||
|
?: =(our.bowl src.bowl) ~
|
||||||
~(watch tr:cc ship desk)^~
|
~(watch tr:cc ship desk)^~
|
||||||
::
|
::
|
||||||
%watch-ack
|
%watch-ack
|
||||||
@ -292,7 +296,7 @@
|
|||||||
++ dock [ship dap.bowl]
|
++ dock [ship dap.bowl]
|
||||||
++ watch (watch:pass dock path)
|
++ watch (watch:pass dock path)
|
||||||
++ watching (~(has by wex.bowl) [path dock])
|
++ watching (~(has by wex.bowl) [path dock])
|
||||||
++ safe-watch `(unit card)`?:(watching ~ `watch)
|
++ safe-watch `(unit card)`?:(|(watching =(our.bowl ship)) ~ `watch)
|
||||||
++ leave (leave:pass dock)
|
++ leave (leave:pass dock)
|
||||||
++ give
|
++ give
|
||||||
=/ t=treaty (~(got by treaties) ship desk)
|
=/ t=treaty (~(got by treaties) ship desk)
|
||||||
|
Loading…
Reference in New Issue
Block a user