call cancelTrading defer

This commit is contained in:
c9s 2020-12-21 15:47:20 +08:00
parent 9db1c78171
commit f12e38b70e

View File

@ -73,6 +73,7 @@ func compileRunFile(filepath string, config *bbgo.Config) error {
func runConfig(basectx context.Context, userConfig *bbgo.Config) error {
ctx, cancelTrading := context.WithCancel(basectx)
defer cancelTrading()
environ := bbgo.NewEnvironment()