1
0
mirror of https://github.com/1Panel-dev/1Panel.git synced 2025-01-31 22:18:07 +08:00

fix: 解决创建网站报端口被占用的问题 (#2699)

Refs https://github.com/1Panel-dev/1Panel/issues/2695
This commit is contained in:
zhengkunwang 2023-10-27 11:00:16 +08:00 committed by GitHub
parent 048df6f390
commit 6c957d157b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -227,8 +227,8 @@ func (w WebsiteService) CreateWebsite(create request.WebsiteCreate) (err error)
errMap["name"] = runtime.Name
return buserr.WithMap("ErrPortExist", errMap, nil)
}
if common.ScanPort(create.Port) {
return buserr.WithDetail(constant.ErrPortInUsed, create.Port, nil)
if common.ScanPort(port) {
return buserr.WithDetail(constant.ErrPortInUsed, port, nil)
}
}
}