coverity 226272

This commit is contained in:
Philippe Teuwen 2019-10-09 22:24:54 +02:00
parent 31cf435045
commit b7d543888c

View file

@ -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