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

rekt_pps
Tyler Goodlet 2023-04-04 13:31:39 -04:00
parent 97e3c06af8
commit 9770a39d7b
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()