mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-17 23:33:12 +09:00
Rework disconnect logic for connectors
Rework the way disconnection at shutdown is done to properly close the connections when the master server is shut down.
This commit is contained in:
1 parent
47ea8f5477
commit
9507608e59
8 files changed
+174
-44
No files matched your search
@@ -78,6 +78,7 @@ before(async function() {
|
||||
await exec(`node master --config ${masterConfigPath} config set master.http_port 8880`);
|
||||
await exec(`node master --config ${masterConfigPath} config set master.https_port 4443`);
|
||||
await exec(`node master --config ${masterConfigPath} config set master.heartbeat_interval 0.25`);
|
||||
await exec(`node master --config ${masterConfigPath} config set master.connector_shutdown_timeout 2`);
|
||||
|
||||
await exec(`node slave --config ${slaveConfigPath} config set slave.id 4`);
|
||||
await exec(`node slave --config ${slaveConfigPath} config set slave.name slave`);
|
||||
@@ -106,6 +107,11 @@ after(async function() {
|
||||
}
|
||||
});
|
||||
|
||||
// Ensure the test processes are stopped.
|
||||
process.on("exit", () => {
|
||||
slaveProcess.kill();
|
||||
masterProcess.kill();
|
||||
});
|
||||
|
||||
|
||||
module.exports = {
|
||||
|
||||
Reference in new issue
Block a user