mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
twap: call trade collector process when shutdown
This commit is contained in:
parent
b9c41b7ad7
commit
6d3a18ad55
|
@ -603,6 +603,8 @@ func (e *FixedQuantityExecutor) Done() <-chan struct{} {
|
|||
// 1. Stop the order updater (by using the execution context)
|
||||
// 2. The order updater cancels all open orders and closes the user data stream
|
||||
func (e *FixedQuantityExecutor) Shutdown(shutdownCtx context.Context) {
|
||||
e.tradeCollector.Process()
|
||||
|
||||
e.mu.Lock()
|
||||
if e.cancelExecution != nil {
|
||||
e.cancelExecution()
|
||||
|
|
Loading…
Reference in New Issue
Block a user