Cancel timer if it exists

This commit is contained in:
Connor Rigby 2018-01-08 15:52:27 -08:00
parent b6f38eb339
commit bd283530a8
2 changed files with 2 additions and 1 deletions

@ -1 +1 @@
Subproject commit d65960761703b835f067828be216c88715d2311b
Subproject commit 70dc10e8c5c560ca75f846816364ce04a78a3379

View file

@ -555,6 +555,7 @@ defmodule Farmbot.Firmware do
end
defp do_reply(state, reply) do
maybe_cancel_timer(state.timer)
case state.current do
%Current{fun: :emergency_lock, from: from} ->
:ok = GenServer.reply from, {:error, :emergency_lock}