mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 14:55:16 +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)
|
// 1. Stop the order updater (by using the execution context)
|
||||||
// 2. The order updater cancels all open orders and closes the user data stream
|
// 2. The order updater cancels all open orders and closes the user data stream
|
||||||
func (e *FixedQuantityExecutor) Shutdown(shutdownCtx context.Context) {
|
func (e *FixedQuantityExecutor) Shutdown(shutdownCtx context.Context) {
|
||||||
|
e.tradeCollector.Process()
|
||||||
|
|
||||||
e.mu.Lock()
|
e.mu.Lock()
|
||||||
if e.cancelExecution != nil {
|
if e.cancelExecution != nil {
|
||||||
e.cancelExecution()
|
e.cancelExecution()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user