Add fix to make AMQP reconnect on any disconnect.

pull/699/head
Connor Rigby 2019-03-05 11:37:39 -08:00 committed by Connor Rigby
parent 9924a3812b
commit 8b1d501967
1 changed files with 2 additions and 0 deletions

View File

@ -341,6 +341,8 @@ defmodule Farmbot.BotState.Transport.AMQP do
{:ok, _tag} <- Basic.consume(chan, q_base <> "_auto_sync", self(), [no_ack: true]),
{:ok, _tag} <- Basic.consume(chan, q_base <> "_nerves_hub", self(), [])
do
Process.link(conn.pid)
Process.link(chan.pid)
%State{conn: conn, chan: chan, bot: device}
end
end