فهرست منبع

Remove redundant check

gabrielseibel1 1 سال پیش
والد
کامیت
a51ddebde7
1فایلهای تغییر یافته به همراه1 افزوده شده و 5 حذف شده
  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
 }