From b7d543888c58b34d280a9030792208d041494468 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Wed, 9 Oct 2019 22:24:54 +0200 Subject: [PATCH] coverity 226272 --- client/scripting.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client/scripting.c b/client/scripting.c index 7157957ca..1368894c8 100644 --- a/client/scripting.c +++ b/client/scripting.c @@ -69,7 +69,10 @@ static int l_fast_push_mode(lua_State *L) { // Disable fast mode and send a dummy command to make it effective if (enable == false) { SendCommandNG(CMD_PING, NULL, 0); - WaitForResponseTimeout(CMD_PING, NULL, 1000); + if (!WaitForResponseTimeout(CMD_PING, NULL, 1000)) { + PrintAndLogEx(WARNING, "command execution time out"); + return returnToLuaWithError(L, "command execution time out"); + } } //Push the retval on the stack