Преглед на файлове

fix convertsion of persistent keepalive

Matthew R Kasun преди 2 години
родител
ревизия
d99b1aa0d3
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      controllers/migrate.go

+ 1 - 1
controllers/migrate.go

@@ -199,7 +199,7 @@ func convertLegacyNode(legacy models.LegacyNode, hostID uuid.UUID) models.Node {
 	node.IsRelay = false
 	node.RelayedNodes = []string{}
 	node.DNSOn = models.ParseBool(legacy.DNSOn)
-	node.PersistentKeepalive = time.Duration(legacy.PersistentKeepalive)
+	node.PersistentKeepalive = time.Duration(int64(time.Second) * int64(legacy.PersistentKeepalive))
 	node.LastModified = time.Now()
 	node.ExpirationDateTime, _ = time.Parse(strconv.Itoa(int(legacy.ExpirationDateTime)), "0")
 	node.EgressGatewayNatEnabled = models.ParseBool(legacy.EgressGatewayNatEnabled)