diff --git a/src/mindcraft/mindserver.js b/src/mindcraft/mindserver.js index d6d81a1..4449a23 100644 --- a/src/mindcraft/mindserver.js +++ b/src/mindcraft/mindserver.js @@ -132,7 +132,15 @@ export function createMindServer(host_public = false, port = 8080) { socket.on('shutdown', () => { console.log('Shutting down'); - process.exit(0); + for (let agentName in agent_connections) { + mindcraft.stopAgent(agentName); + } + // wait 2 seconds + setTimeout(() => { + console.log('Exiting MindServer'); + process.exit(0); + }, 2000); + }); socket.on('send-message', (agentName, message) => { diff --git a/tasks/example_tasks.json b/tasks/example_tasks.json index 8122649..713a0b5 100644 --- a/tasks/example_tasks.json +++ b/tasks/example_tasks.json @@ -26,7 +26,7 @@ } }, "type": "debug", - "timeout": 60 + "timeout": 25 }, "debug_2_agent_timeout": { "goal": "Just stand at a place and don't do anything",