Jelajahi Sumber

Fix ConvertAPIHostToNMHost

gabrielseibel1 1 tahun lalu
induk
melakukan
c02eb3a8a7
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      models/api_host.go

+ 1 - 1
models/api_host.go

@@ -100,7 +100,7 @@ func (a *ApiHost) ConvertAPIHostToNMHost(currentHost *Host) *Host {
 	if h.PersistentKeepalive == 0 {
 		h.PersistentKeepalive = time.Duration(a.PersistentKeepalive)
 	} else {
-		h.PersistentKeepalive = currentHost.PersistentKeepalive
+		h.PersistentKeepalive = time.Duration(a.PersistentKeepalive)
 	}
 	return &h
 }