From 59c71a34ba7b7eedbd0326d0672b532062cb000b Mon Sep 17 00:00:00 2001 From: Simon Voordouw Date: Thu, 6 Jul 2017 18:14:04 +0200 Subject: [PATCH] move removing current-print file to stopFetch --- src/rest/api/api_printer.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rest/api/api_printer.lua b/src/rest/api/api_printer.lua index 4e5467e..2cf5710 100644 --- a/src/rest/api/api_printer.lua +++ b/src/rest/api/api_printer.lua @@ -74,6 +74,7 @@ end local function stopFetch() io.popen("killall print-fetch"):close() io.popen("rm /tmp/startcode /tmp/endcode"):close() + setCurrentPrint(nil) end function M.progress(request, response) @@ -191,7 +192,6 @@ function M.stop_POST(request, response) if not printer or not printer:hasSocket() then return end stopFetch() - setCurrentPrint(nil) if(argGcode == nil) then argGcode = ""