mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-11-30 19:11:59 +03:00
ames: use abet pattern for flubbing
This commit is contained in:
parent
4fe9de8194
commit
a5f88cb24e
@ -1201,6 +1201,7 @@
|
||||
::
|
||||
+$ message-sink-task
|
||||
$% [%done ok=?]
|
||||
[%flub ~]
|
||||
[%drop =message-num]
|
||||
[%hear =lane =shut-packet ok=?]
|
||||
==
|
||||
@ -1677,20 +1678,8 @@
|
||||
=* her her.u.parsed
|
||||
=/ =bone
|
||||
?-(u.parsed [%new *] bone.u.parsed, [%old *] bone.u.parsed)
|
||||
=. peers.ames-state
|
||||
%+ ~(jab by peers.ames-state) her
|
||||
|= =ship-state
|
||||
?> ?=(%known -.ship-state)
|
||||
%= ship-state
|
||||
rcv
|
||||
%+ ~(jab by rcv.ship-state) bone
|
||||
|= =message-sink-state
|
||||
%= message-sink-state
|
||||
last-heard (dec last-heard.message-sink-state)
|
||||
pending-vane-ack ~(nap to pending-vane-ack.message-sink-state)
|
||||
==
|
||||
==
|
||||
event-core
|
||||
=/ peer-core (abed-got:pe her)
|
||||
abet:(on-flub:peer-core bone)
|
||||
:: +on-take-done: handle notice from vane that it processed a message
|
||||
::
|
||||
++ on-take-done
|
||||
@ -2950,6 +2939,11 @@
|
||||
:- >[bone=bone message-num=message-num meat=meat]:shut-packet<
|
||||
tang.u.dud
|
||||
abet:(call:(abed:mu bone) %hear [message-num +.meat]:shut-packet)
|
||||
::
|
||||
++ on-flub
|
||||
|= =bone
|
||||
^+ peer-core
|
||||
abet:(call:(abed:mi:peer-core bone) %flub ~)
|
||||
:: +on-memo: handle request to send message
|
||||
::
|
||||
++ on-memo
|
||||
@ -3881,6 +3875,12 @@
|
||||
?- -.task
|
||||
%drop sink(nax.state (~(del in nax.state) message-num.task))
|
||||
%done (done ok.task)
|
||||
::
|
||||
%flub
|
||||
%= sink
|
||||
last-heard.state (dec last-heard.state)
|
||||
pending-vane-ack.state ~(nap to pending-vane-ack.state)
|
||||
==
|
||||
::
|
||||
%hear
|
||||
|^ ?: ?| corked
|
||||
|
Loading…
Reference in New Issue
Block a user