mirror of
https://github.com/ilyakooo0/urbit.git
synced 2025-01-01 19:46:36 +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
|
||||
|= =ship
|
||||
^+ event-core
|
||||
=/ =plea [%$ /flow [%cork ~]]
|
||||
=/ 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
|
||||
=/ =channel [[our ship] now channel-state -.peer-state]
|
||||
::
|
||||
=^ =bone ossuary.peer-state (bind-duct ossuary.peer-state duct)
|
||||
=/ =plea [%$ /flow [%cork ~]]
|
||||
::
|
||||
=. closing.peer-state (~(put in closing.peer-state) bone)
|
||||
%- %^ trace msg.veb ship
|
||||
@ -2058,6 +2060,8 @@
|
||||
=. event-core
|
||||
%+ reel messages.todos
|
||||
|= [[=^duct =plea] core=_event-core]
|
||||
?: ?=(%$ -.plea)
|
||||
(on-cork:core(duct duct) ship)
|
||||
(on-plea:core(duct duct) ship plea)
|
||||
:: apply outgoing packet blobs
|
||||
::
|
||||
|
Loading…
Reference in New Issue
Block a user