mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
fix: sync api guard condition
This commit is contained in:
parent
ea88e84445
commit
bee85f7973
|
@ -77,7 +77,7 @@ func (s *Server) newEngine(ctx context.Context) *gin.Engine {
|
|||
})
|
||||
|
||||
r.POST("/api/environment/sync", func(c *gin.Context) {
|
||||
if s.Environ.IsSyncing() == bbgo.SyncDone {
|
||||
if s.Environ.IsSyncing() != bbgo.Syncing {
|
||||
go func() {
|
||||
// We use the root context here because the syncing operation is a background goroutine.
|
||||
// It should not be terminated if the request is disconnected.
|
||||
|
|
Loading…
Reference in New Issue
Block a user