retry %direct binding verification of 504 response (cttp timeout)

This commit is contained in:
Joe Bryan 2018-07-15 17:00:21 -04:00
parent 7ea4b5bc0b
commit f5991978be
2 changed files with 34 additions and 12 deletions

View File

@ -6,17 +6,20 @@
:: ::
|% |%
+= move (pair bone card) += move (pair bone card)
+= poke $% [%dns-bind for=ship him=ship target] += poke
[%dns-bond for=ship him=ship turf] $% [%dns-bind for=ship him=ship target]
[%dns-authority authority] [%dns-bond for=ship him=ship turf]
:: XX some other notification channel? [%dns-authority authority]
[%helm-send-hi ship (unit tape)] :: XX some other notification channel?
== [%helm-send-hi ship (unit tape)]
+= card $% [%tend wire ~] ==
[%poke wire dock poke] += card
[%rule wire %turf %put turf] $% [%tend wire ~]
[%hiss wire [~ ~] %httr %hiss hiss:eyre] [%wait wire @da]
== [%poke wire dock poke]
[%rule wire %turf %put turf]
[%hiss wire [~ ~] %httr %hiss hiss:eyre]
==
:: +state: complete app state :: +state: complete app state
:: ::
+= state += state
@ -192,6 +195,11 @@
=/ him=ship (slav %p i.t.wir) =/ him=ship (slav %p i.t.wir)
?: =(200 p.rep) ?: =(200 p.rep)
abet:~(bind tell [him (~(get by per) him)]) abet:~(bind tell [him (~(get by per) him)])
:: cttp timeout
?: =(504 p.rep)
:: XX backoff, refactor
:_ this :_ ~
[ost.bow %wait wir (add now.bow ~m10)]
:: XX specific messages per status code :: XX specific messages per status code
~& %direct-confirm-fail ~& %direct-confirm-fail
abet:(~(fail tell [him (~(get by per) him)]) %failed-request) abet:(~(fail tell [him (~(get by per) him)]) %failed-request)
@ -219,6 +227,16 @@
%- (slog saw) %- (slog saw)
abet:(~(fail tell [him (~(get by per) him)]) %crash) abet:(~(fail tell [him (~(get by per) him)]) %crash)
== ==
:: +wake: timer callback
::
++ wake
|= [wir=wire ~]
^- (quip move _this)
?. ?=([%check @ ~] wir)
~& [%strange-wake wir]
[~ this]
=/ him=ship (slav %p i.t.wir)
abet:~(check tell [him (~(get by per) him)])
:: ::
:: +poke-dns-authority: configure self as an authority :: +poke-dns-authority: configure self as an authority
:: ::
@ -405,7 +423,7 @@
!=(tar tar.u.rel) !=(tar tar.u.rel)
== ==
this this
=. rel `[wen=now.bow adr bon=| tar] =. rel `[wen=now.bow adr bon=| try=0 tar]
?:(?=(%indirect -.tar) bind check) ?:(?=(%indirect -.tar) bind check)
:: +check: confirm %direct target is accessible :: +check: confirm %direct target is accessible
:: ::
@ -415,6 +433,9 @@
?> ?=(%direct -.tar.u.rel) ?> ?=(%direct -.tar.u.rel)
?: (reserved p.tar.u.rel) ?: (reserved p.tar.u.rel)
(fail %reserved-ip) (fail %reserved-ip)
?: (gth try.u.rel 2)
(fail %unreachable)
=. try.u.rel +(try.u.rel)
=/ wir=wire =/ wir=wire
/check/(scot %p him) /check/(scot %p him)
=/ url=purl:eyre =/ url=purl:eyre

View File

@ -53,6 +53,7 @@
$: wen=@da $: wen=@da
wer=(unit @if) wer=(unit @if)
bon=? bon=?
try=@ud
tar=target tar=target
== ==
-- --