Always set contract sub state
parent
4753dc2db8
commit
c94ce47aa6
|
@ -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()
|
||||||
|
|
Loading…
Reference in New Issue