v1.5.1 增强程序稳定性
This commit is contained in:
@@ -116,11 +116,11 @@ func OpenStoreDir(dir string, storeName string) (*Store, error) {
|
||||
}
|
||||
|
||||
var storeOnce = &sync.Once{}
|
||||
var defaultSore *Store
|
||||
var defaultStore *Store
|
||||
|
||||
func DefaultStore() (*Store, error) {
|
||||
if defaultSore != nil {
|
||||
return defaultSore, nil
|
||||
if defaultStore != nil {
|
||||
return defaultStore, nil
|
||||
}
|
||||
|
||||
var resultErr error
|
||||
@@ -137,10 +137,10 @@ func DefaultStore() (*Store, error) {
|
||||
remotelogs.Error("KV", resultErr.Error())
|
||||
return
|
||||
}
|
||||
defaultSore = store
|
||||
defaultStore = store
|
||||
})
|
||||
|
||||
return defaultSore, resultErr
|
||||
return defaultStore, resultErr
|
||||
}
|
||||
|
||||
func (this *Store) Path() string {
|
||||
|
||||
Reference in New Issue
Block a user