修复插件资源限制失败阻塞主服务
This commit is contained in:
parent
25cf1478f0
commit
f23af282ca
@ -375,19 +375,16 @@ func Init(serverVersion string) {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
launchSpec.closeParentFiles()
|
launchSpec.closeParentFiles()
|
||||||
if limitErr := applyPluginResourceLimits(process); limitErr != nil {
|
|
||||||
log.Warnf("[%s] Plugin resource limits could not be applied", logicalID)
|
|
||||||
_ = process.Kill()
|
|
||||||
_, _ = process.Wait()
|
|
||||||
launchSpec.cleanup()
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
processListMu.Lock()
|
processListMu.Lock()
|
||||||
processList = append(processList, process)
|
processList = append(processList, process)
|
||||||
processListMu.Unlock()
|
processListMu.Unlock()
|
||||||
pluginNo++
|
pluginNo++
|
||||||
|
|
||||||
go waitPlugin(process, logicalID, socketPath, launchSpec)
|
go waitPlugin(process, logicalID, socketPath, launchSpec)
|
||||||
|
if limitErr := applyPluginResourceLimits(process); limitErr != nil {
|
||||||
|
log.Warnf("[%s] Plugin resource limits could not be applied", logicalID)
|
||||||
|
_ = process.Kill()
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
if !waitPluginSocket(socketPath) {
|
if !waitPluginSocket(socketPath) {
|
||||||
log.Warnf("[%s] Plugin socket was not created", logicalID)
|
log.Warnf("[%s] Plugin socket was not created", logicalID)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user