mirror of
https://github.com/urbit/shrub.git
synced 2024-11-28 13:54:20 +03:00
Merge pull request #6449 from urbit/ted/ames-ping-2
ames: ping faster to sponsors
This commit is contained in:
commit
59567b9e51
@ -42,10 +42,9 @@
|
||||
%- (slog leaf+"ping: strange state {<ship s>}" ~)
|
||||
`state
|
||||
:: 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.
|
||||
:: minutes is a common value. We use 25 seconds, same as Wireguard.
|
||||
::
|
||||
=/ until (add ~s30 now)
|
||||
=/ until (add ~s25 now)
|
||||
=. ships.state
|
||||
(~(put by ships.state) ship u.s(ship-state [%waiting until]))
|
||||
:_ state
|
||||
|
@ -3310,13 +3310,19 @@
|
||||
++ num-slots
|
||||
^- @ud
|
||||
(sub-safe cwnd live-packets)
|
||||
::
|
||||
:: +clamp-rto: apply min and max to an .rto value
|
||||
::
|
||||
++ clamp-rto
|
||||
|= rto=@dr
|
||||
^+ rto
|
||||
(min ~m2 (max ^~((div ~s1 5)) rto))
|
||||
(min max-backoff (max ^~((div ~s1 5)) rto))
|
||||
:: +max-backoff: calculate highest re-send interval
|
||||
::
|
||||
:: Keeps pinhole to sponsors open by inspecting the duct (hack).
|
||||
::
|
||||
++ max-backoff
|
||||
^- @dr
|
||||
?:(?=([[%gall %use %ping *] *] duct) ~s25 ~m2)
|
||||
:: +in-slow-start: %.y iff we're in "slow-start" mode
|
||||
::
|
||||
++ in-slow-start
|
||||
|
Loading…
Reference in New Issue
Block a user