Pārlūkot izejas kodu

Remove redundant check

gabrielseibel1 1 gadu atpakaļ
vecāks
revīzija
a51ddebde7
1 mainītis faili ar 1 papildinājumiem un 5 dzēšanām
  1. 1 5
      models/api_host.go

+ 1 - 5
models/api_host.go

@@ -97,10 +97,6 @@ func (a *ApiHost) ConvertAPIHostToNMHost(currentHost *Host) *Host {
 	h.IsDefault = a.IsDefault
 	h.NatType = currentHost.NatType
 	h.TurnEndpoint = currentHost.TurnEndpoint
-	if h.PersistentKeepalive == 0 {
-		h.PersistentKeepalive = time.Duration(a.PersistentKeepalive)
-	} else {
-		h.PersistentKeepalive = time.Duration(a.PersistentKeepalive)
-	}
+	h.PersistentKeepalive = time.Duration(a.PersistentKeepalive)
 	return &h
 }