       ping_fails: 0
     }
 
-    {:ok, state, 1000}
+    {:ok, state}
   end
 
   def terminate(reason, state) do

    if state.chan, do: ConnectionWorker.close_channel(state.chan)
  end

  def handle_info(:timeout, state) do
    bot = state.jwt.bot
    ping = bot <> "_ping"
    route = "bot.#{bot}.ping"

      {:noreply, %{state | conn: conn, chan: chan}}
    else
      nil ->
        Process.send_after(self(), :amqp_connect, 5000)
        {:noreply, %{state | conn: nil, chan: nil}}

      err ->
        FarmbotCore.Logger.error(1, "Failed to connect to PingPong channel: #{inspect(err)}")
        Process.send_after(self(), :amqp_connect, 2000)
        {:noreply, %{state | conn: nil, chan: nil}}
    end
  end

