From f11bff6191ca1e3b40236891f7efe4809f2ad237 Mon Sep 17 00:00:00 2001 From: empathicqubit Date: Fri, 5 Nov 2021 13:00:18 +0100 Subject: [PATCH] Quit --- commands.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/commands.lua b/commands.lua index 3c75dda..83714b4 100644 --- a/commands.lua +++ b/commands.lua @@ -347,6 +347,11 @@ return function(server) server.running = true end + local function processQuit(command) + server.response(server.responseType.QUIT, server.errorType.OK, command.requestId, nil) + os.exit(0) + end + local function processReset(command) server.running = true emu.reset() @@ -866,6 +871,8 @@ return function(server) elseif ct == server.commandType.EXIT then processExit(command) + elseif ct == server.commandType.QUIT then + processQuit(command) elseif ct == server.commandType.RESET then processReset(command) else