mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-14 08:34:25 +03:00
ames: make routing simpler
This commit is contained in:
parent
be5fb8b9cf
commit
41fd367bff
@ -41,7 +41,11 @@
|
||||
?. ?=(%poking -.ship-state.u.s)
|
||||
%- (slog leaf+"ping: strange state {<ship s>}" ~)
|
||||
`state
|
||||
=/ until (add ~m5 now)
|
||||
:: NAT timeouts are often pretty short for UDP entries. 5
|
||||
:: minutes is a common value. We use 30 seconds, which is fairly
|
||||
:: aggressive, but should be safe.
|
||||
::
|
||||
=/ until (add ~s30 now)
|
||||
=. ships.state
|
||||
(~(put by ships.state) ship u.s(ship-state [%waiting until]))
|
||||
:_ state
|
||||
|
@ -1886,6 +1886,20 @@
|
||||
::
|
||||
=/ =peer-state +.u.ship-state
|
||||
::
|
||||
:: XX routing hack to mimic old ames.
|
||||
::
|
||||
:: Before removing this, consider: moons when their planet is
|
||||
:: behind a NAT; a planet receiving initial acknowledgment
|
||||
:: from a star; a planet talking to another planet under
|
||||
:: another galaxy.
|
||||
::
|
||||
?: ?| =(our ship)
|
||||
?& !=(final-ship ship)
|
||||
!=(%czar (clan:title ship))
|
||||
==
|
||||
==
|
||||
(try-next-sponsor sponsor.peer-state)
|
||||
::
|
||||
?: =(our ship)
|
||||
:: if forwarding, don't send to sponsor to avoid loops
|
||||
::
|
||||
|
Loading…
Reference in New Issue
Block a user