Explorar el Código

if 443 not available fallback to 51821

abhishek9686 hace 3 meses
padre
commit
5ff348e083
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      logic/hosts.go

+ 2 - 1
logic/hosts.go

@@ -568,8 +568,9 @@ func CheckHostPorts(h *models.Host) {
 	for i := 0; portsInUse[h.ListenPort] && i < maxPort-minPort+1; i++ {
 		if h.ListenPort == 443 {
 			h.ListenPort = 51821
+		} else {
+			h.ListenPort++
 		}
-		h.ListenPort++
 		if h.ListenPort > maxPort {
 			h.ListenPort = minPort
 		}