Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ax l
MCSManager
Commits
f0244032
Unverified
Commit
f0244032
authored
5 years ago
by
利姆露酱
Committed by
GitHub
5 years ago
Browse files
Options
Download
Email Patches
Plain Diff
Update BaseMcserver.js
修复docker会开一堆容器
parent
76e8029a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
core/Process/BaseMcserver.js
+4
-2
core/Process/BaseMcserver.js
with
4 additions
and
2 deletions
+4
-2
core/Process/BaseMcserver.js
+
4
-
2
View file @
f0244032
...
...
@@ -179,8 +179,8 @@ class ServerProcess extends EventEmitter {
process
.
stderr
=
null
;
// 模拟进程杀死功能
process
.
kill
=
(()
=>
{
docker
.
getContainer
(
auxContainer
.
id
).
kill
().
then
(()
=>
{
docker
.
getContainer
(
auxContainer
.
id
).
remove
().
then
(()
=>
{
auxContainer
.
kill
().
then
(()
=>
{
auxContainer
.
remove
().
then
(()
=>
{
MCSERVER
.
log
(
'
实例
'
,
'
[
'
,
self
.
dataModel
.
name
,
'
]
'
,
'
容器已强制移除
'
);
});
});
...
...
@@ -189,6 +189,7 @@ class ServerProcess extends EventEmitter {
auxContainer
.
wait
(()
=>
{
self
.
emit
(
'
exit
'
,
0
);
self
.
stop
();
auxContainer
.
remove
();
});
// 容器流错误事件传递
stream
.
on
(
'
error
'
,
(
err
)
=>
{
...
...
@@ -201,6 +202,7 @@ class ServerProcess extends EventEmitter {
if
(
!
process
.
pid
)
{
MCSERVER
.
error
(
'
服务端进程启动失败,建议检查启动命令与参数是否正确
'
);
self
.
stop
();
auxContainer
.
remove
();
throw
new
Error
(
'
服务端进程启动失败,建议检查启动命令与参数是否正确
'
);
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help