mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-26 08:45:16 +00:00
ignore sync if sync service is nil
This commit is contained in:
parent
4730efefa3
commit
b71ea867c5
|
@ -506,6 +506,10 @@ func (environ *Environment) setSyncing(status SyncStatus) {
|
||||||
|
|
||||||
// Sync syncs all registered exchange sessions
|
// Sync syncs all registered exchange sessions
|
||||||
func (environ *Environment) Sync(ctx context.Context) error {
|
func (environ *Environment) Sync(ctx context.Context) error {
|
||||||
|
if environ.SyncService == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
environ.syncMutex.Lock()
|
environ.syncMutex.Lock()
|
||||||
defer environ.syncMutex.Unlock()
|
defer environ.syncMutex.Unlock()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user