Merge pull request #6102 from urbit/yu/kill-nack-flows

ames, gall: send a %cork if getting a %nack for a %watch
This commit is contained in:
Ted Blackman 2022-11-28 11:57:07 -06:00 committed by GitHub
commit 35194a6a08
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 1 deletions

View File

@ -2790,11 +2790,18 @@
::
(emit [/ames]~ %pass wire %b %rest next-wake)
=/ nax-bone=^bone (mix 0b10 bone)
=? peer-core (~(has by snd.peer-state) nax-bone)
%. peer-core
%+ trace odd.veb
=/ dat [her.channel bone=nax-bone message-num=message-num -.task]
|.("remove naxplanation flow {<dat>}")
=. peer-state
=, peer-state
%_ peer-state
:: preemptively delete nax flows (e.g. nacks for initial %watches)
::
snd (~(del by (~(del by snd) bone)) nax-bone)
rcv (~(del by rcv) bone)
snd (~(del by snd) bone)
corked (~(put in corked) bone)
closing (~(del in closing) bone)
krocs (~(del in krocs) bone)

View File

@ -523,6 +523,11 @@
?~ error=error.sign-arvo
~
`[[%leaf (trip tag.u.error)] tang.u.error]
:: send a %cork if we get a nack upon initial subscription
::
=? mo-core
&(?=(^ err) |(?=(%watch-as remote-request) ?=(%watch remote-request)))
(mo-pass [%sys wire] %a %cork ship)
::
?- remote-request
%watch-as (mo-give %unto %watch-ack err)