فهرست منبع

Patched reload fsh bug

tobychui 2 سال پیش
والد
کامیت
ecbc82544d
1فایلهای تغییر یافته به همراه3 افزوده شده و 1 حذف شده
  1. 3 1
      storage.go

+ 3 - 1
storage.go

@@ -147,13 +147,15 @@ func StoragePerformFileSystemAbstractionConnectionHeartbeat() {
 			originalStartOption := filesystem.FileSystemOption{}
 			js, _ := json.Marshal(thisFsh.StartOptions)
 			json.Unmarshal(js, &originalStartOption)
-			thisFsh.Close()
 
 			//Create a new fsh from original start options
 			newfsh, err := filesystem.NewFileSystemHandler(originalStartOption)
 			if err != nil {
 				log.Println("[Storage] Unable to reconnect " + thisFsh.Name + ": " + err.Error())
 				continue
+			} else {
+				//New fsh created. Close the old one
+				thisFsh.Close()
 			}
 
 			//Pop this fsh from all storage pool that mounted this