Sfoglia il codice sorgente

if 443 not available fallback to 51821

abhishek9686 3 mesi fa
parent
commit
5ff348e083
1 ha cambiato i file con 2 aggiunte e 1 eliminazioni
  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
 		}