# HG changeset patch # User Matthew Wild # Date 1536704648 -3600 # Node ID ce945ba7a754b166e63f5b04d21a0f41d27d45fe # Parent e087dd875160e83f82242244ee1c0dd8b941c4fa main: Don't let action timeout fire after a script already finished diff -r e087dd875160 -r ce945ba7a754 main.lua --- a/main.lua Tue Sep 11 23:06:24 2018 +0100 +++ b/main.lua Tue Sep 11 23:24:08 2018 +0100 @@ -134,6 +134,7 @@ end local function uninitialize_script(script) + script.finished = true; for name, obj in pairs(script.objects) do if obj.handler._finish then obj.handler._finish(obj); @@ -195,7 +196,7 @@ if action_timeout and action_timeout > 0 then local action_number = i; verse.add_task(action_timeout, function () - if i == action_number then + if i == action_number and not script.finished then local e = new_error("action-timeout", { text = "Timeout waiting for response" }); error(e); end