Change port check (#1268)

We can use same port on difference IP's.
This commit is contained in:
guard43ru 2023-12-16 21:48:07 +03:00 committed by GitHub
parent c6881e5149
commit 9b60b0fd45
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 != "" {