Cancel the `OrderClient` sync-method relay task on exit

pre_overruns_ctxcancelled
Tyler Goodlet 2023-04-04 13:31:39 -04:00
parent 9c5d6d2592
commit c44627ab52
1 changed files with 7 additions and 1 deletions

View File

@ -240,7 +240,10 @@ async def open_ems(
''' '''
broker, symbol, suffix = unpack_fqme(fqme) broker, symbol, suffix = unpack_fqme(fqme)
async with maybe_open_emsd(broker) as portal: async with maybe_open_emsd(
broker,
loglevel=loglevel,
) as portal:
mod = get_brokermod(broker) mod = get_brokermod(broker)
if ( if (
@ -304,3 +307,6 @@ async def open_ems(
accounts, accounts,
dialogs, dialogs,
) )
# stop the sync-msg-relay task on exit.
n.cancel_scope.cancel()