pre-save syncing var for return

This commit is contained in:
c9s 2021-02-21 18:54:48 +08:00
parent a5f0724ba5
commit 3629a1f5a2

View File

@ -476,11 +476,11 @@ func (environ *Environment) Connect(ctx context.Context) error {
return nil
}
func (environ *Environment) IsSyncing() bool {
func (environ *Environment) IsSyncing() (syncing bool) {
environ.syncMutex.Lock()
defer environ.syncMutex.Unlock()
return environ.syncing
syncing = environ.syncing
environ.syncMutex.Unlock()
return syncing
}
// Sync syncs all registered exchange sessions