Explorar el Código

Change port check (#1268)

We can use same port on difference IP's.
guard43ru hace 1 año
padre
commit
9b60b0fd45
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      web/entity/entity.go

+ 2 - 2
web/entity/entity.go

@@ -72,8 +72,8 @@ func (s *AllSetting) CheckValid() error {
 		return common.NewError("Sub port is not a valid port:", s.SubPort)
 	}
 
-	if s.SubPort == s.WebPort {
-		return common.NewError("Sub and Web could not use same port:", s.SubPort)
+	if (s.SubPort == s.WebPort) && (s.WebListen == s.SubListen) {
+		return common.NewError("Sub and Web could not use same ip:port, ", s.SubListen, ":", s.SubPort, " & ", s.WebListen, ":", s.WebPort)
 	}
 
 	if s.WebCertFile != "" || s.WebKeyFile != "" {