Skip to content

Commit

Permalink
Add fix to make AMQP reconnect on any disconnect.
Browse files Browse the repository at this point in the history
  • Loading branch information
Connor Rigby committed Mar 5, 2019
1 parent 466ead5 commit f69206c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/farmbot/bot_state/transport/amqp/amqp.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f69206c

Please sign in to comment.