mirror of
https://github.com/ilyakooo0/urbit.git
synced 2025-01-04 13:19:48 +03:00
Merge pull request #6046 from urbit/lf/fix-cork
ames: prevent crashes when corking an alien flow
This commit is contained in:
commit
1b4f045499
@ -1777,14 +1777,16 @@
|
|||||||
++ on-cork
|
++ on-cork
|
||||||
|= =ship
|
|= =ship
|
||||||
^+ event-core
|
^+ event-core
|
||||||
|
=/ =plea [%$ /flow [%cork ~]]
|
||||||
=/ ship-state (~(get by peers.ames-state) ship)
|
=/ ship-state (~(get by peers.ames-state) ship)
|
||||||
::
|
?. ?=([~ %known *] ship-state)
|
||||||
?> ?=([~ %known *] ship-state)
|
%+ enqueue-alien-todo ship
|
||||||
|
|= todos=alien-agenda
|
||||||
|
todos(messages [[duct plea] messages.todos])
|
||||||
=/ =peer-state +.u.ship-state
|
=/ =peer-state +.u.ship-state
|
||||||
=/ =channel [[our ship] now channel-state -.peer-state]
|
=/ =channel [[our ship] now channel-state -.peer-state]
|
||||||
::
|
::
|
||||||
=^ =bone ossuary.peer-state (bind-duct ossuary.peer-state duct)
|
=^ =bone ossuary.peer-state (bind-duct ossuary.peer-state duct)
|
||||||
=/ =plea [%$ /flow [%cork ~]]
|
|
||||||
::
|
::
|
||||||
=. closing.peer-state (~(put in closing.peer-state) bone)
|
=. closing.peer-state (~(put in closing.peer-state) bone)
|
||||||
%- %^ trace msg.veb ship
|
%- %^ trace msg.veb ship
|
||||||
@ -2058,6 +2060,8 @@
|
|||||||
=. event-core
|
=. event-core
|
||||||
%+ reel messages.todos
|
%+ reel messages.todos
|
||||||
|= [[=^duct =plea] core=_event-core]
|
|= [[=^duct =plea] core=_event-core]
|
||||||
|
?: ?=(%$ -.plea)
|
||||||
|
(on-cork:core(duct duct) ship)
|
||||||
(on-plea:core(duct duct) ship plea)
|
(on-plea:core(duct duct) ship plea)
|
||||||
:: apply outgoing packet blobs
|
:: apply outgoing packet blobs
|
||||||
::
|
::
|
||||||
|
Loading…
Reference in New Issue
Block a user