Merge pull request #5951 from urbit/pkova/dns-race

dns-address: subscribe before poke and fix wire mismatch
This commit is contained in:
fang 2022-09-07 19:41:14 +02:00 committed by GitHub
commit 50ee2eb1c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -30,12 +30,12 @@
?. good
%+ strand-fail:strandio %bail-early-self-check
[>"couldn't access ship on port 80"< ~]
;< our=@p bind:m get-our:strandio
;< ~ bind:m (watch:strandio /response collector-app /(scot %p our))
;< ~ bind:m (poke:strandio collector-app %dns-address !>([%if if]))
=/ msg=cord
(cat 3 'request for DNS sent to ' (scot %p p:collector-app))
;< ~ bind:m (app-message:strandio %dns msg ~)
;< our=@p bind:m get-our:strandio
;< ~ bind:m (watch:strandio /sub collector-app /(scot %p our))
=/ msg=cord
(cat 3 'awaiting response from ' (scot %p p:collector-app))
;< ~ bind:m (app-message:strandio %dns msg ~)
@ -45,7 +45,7 @@
=/ m (strand ,~)
^- form:m
;< our=ship bind:m get-our:strandio
;< =cage bind:m (take-fact:strandio /(scot %p our))
;< =cage bind:m (take-fact:strandio /response)
?> ?=(%dns-binding p.cage)
=/ =binding:dns !<(binding:dns q.cage)
;< good=? bind:m (turf-confirm-install:libdns turf.binding)