浏览代码

Net 662 convert pka to seconds vice nsec (#2627)

* force listenport/persisentkeepalive to defaults if 0 during migration

* convert pka to seconds vice nsec
Matthew R Kasun 2 年之前
父节点
当前提交
09b55286dd
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      controllers/migrate.go

+ 1 - 1
controllers/migrate.go

@@ -154,7 +154,7 @@ func convertLegacyHostNode(legacy models.LegacyNode) (models.Host, models.Node)
 	host.IsDocker = models.ParseBool(legacy.IsDocker)
 	host.IsK8S = models.ParseBool(legacy.IsK8S)
 	host.IsStatic = models.ParseBool(legacy.IsStatic)
-	host.PersistentKeepalive = time.Duration(legacy.PersistentKeepalive)
+	host.PersistentKeepalive = time.Duration(legacy.PersistentKeepalive) * time.Second
 	if host.PersistentKeepalive == 0 {
 		host.PersistentKeepalive = models.DefaultPersistentKeepAlive
 	}