garrettjoecox / scriptserver

A Minecraft server wrapper, allows for simple plugins in vanilla
GNU General Public License v3.0
68 stars 10 forks source link

A bug for start and stop function #6

Closed kyob1010 closed 7 years ago

kyob1010 commented 7 years ago

When you stop a running server, it will kill the child process and set the variable to null which also known as "server.spawn".

Later, I exit my program. It means that it will trigger the callback of event process.exit. Here is where the bug happened.

"server.spawn === null" AND the callback calls "server.spawn.kill" function

I'll do a quick fix for that.

kyob1010 commented 7 years ago

I send a pull request for my solution.

garrettjoecox commented 7 years ago

Merged the PR, thanks!