fix: exception in standalone mode
This commit is contained in:
@@ -40,7 +40,9 @@ func (s *StorageService) Start() error {
|
||||
}
|
||||
|
||||
func (s *StorageService) Close() error {
|
||||
Storage.DB.Close()
|
||||
if Storage.DB != nil {
|
||||
Storage.DB.Close()
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ func Register(service adapter.Service) {
|
||||
}
|
||||
|
||||
func StartServices() error {
|
||||
CloseServices()
|
||||
for _, service := range preservices {
|
||||
if err := service.Start(); err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user