Always set contract sub state

kivy_mainline_and_py3.8
Tyler Goodlet 2019-01-14 21:13:22 -05:00
parent 4753dc2db8
commit c94ce47aa6
1 changed files with 3 additions and 0 deletions

View File

@ -365,6 +365,8 @@ class OptionChain(object):
label.symbol = symbol label.symbol = symbol
if table: if table:
table.add_widget(label) table.add_widget(label)
# always keep track of current subscription
self.symbol, self.expiry = symbol, expiry
return return
# start streaming soonest contract by default if not provided # start streaming soonest contract by default if not provided
@ -498,5 +500,6 @@ async def _async_main(
# trio-kivy entry point. # trio-kivy entry point.
await async_runTouchApp(chain.widgets['root']) # run kivy await async_runTouchApp(chain.widgets['root']) # run kivy
finally: finally:
await chain._quote_gen.aclose()
# cancel GUI update task # cancel GUI update task
nursery.cancel_scope.cancel() nursery.cancel_scope.cancel()