mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2026-09-25 00:00:53 +00:00
fix: 解决创建网站报端口被占用的问题 (#2699)
Refs https://github.com/1Panel-dev/1Panel/issues/2695
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user