Don't forget to pop the brokerd dialogue on teardown..
parent
8f05254c80
commit
003fa6254f
|
@ -514,8 +514,11 @@ async def translate_and_relay_brokerd_events(
|
|||
).dict()
|
||||
)
|
||||
|
||||
if client_flow_complete:
|
||||
router.dialogues.pop(oid)
|
||||
# TODO: do we want this to keep things cleaned up?
|
||||
# it might require a special status from brokerd to affirm the
|
||||
# flow is complete?
|
||||
# if client_flow_complete:
|
||||
# router.dialogues.pop(oid)
|
||||
|
||||
|
||||
async def process_client_order_cmds(
|
||||
|
@ -810,8 +813,13 @@ async def maybe_open_brokerd_trades_dialogue(
|
|||
|
||||
_router.relays[broker] = (positions, brokerd_trades_stream)
|
||||
|
||||
try:
|
||||
yield positions, brokerd_trades_stream
|
||||
|
||||
finally:
|
||||
# remove from cache so next client will respawn if needed
|
||||
_router.relays.pop(broker)
|
||||
|
||||
|
||||
@tractor.context
|
||||
async def _emsd_main(
|
||||
|
|
Loading…
Reference in New Issue