Change port check

We can use same port on difference IP's.
This commit is contained in:
guard43ru 2023-11-28 15:01:34 +03:00 committed by GitHub
parent abc590ae71
commit 0f317359d9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -82,8 +82,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 != "" {