close socket before updating.
This commit is contained in:
parent
47dcf07314
commit
7b4517e320
|
@ -126,6 +126,8 @@ defmodule Farmbot.System.Updates.SlackUpdater do
|
|||
dl_fun = Farmbot.BotState.download_progress_fun("FBOS_OTA")
|
||||
case Farmbot.HTTP.download_file(dl_url, Path.join(@data_path, name), dl_fun, "", [{'Authorization', 'Bearer #{state.token}'}]) do
|
||||
{:ok, path} ->
|
||||
Process.unlink(state.rtm_socket)
|
||||
send(state.rtm_socket, {:stop, "going down for update."})
|
||||
Nerves.Firmware.upgrade_and_finalize(path)
|
||||
Farmbot.System.reboot("Slack update.")
|
||||
{:stop, :normal, %{state | updating: true}}
|
||||
|
|
Loading…
Reference in a new issue