From c268f55ae90f60bf9a1845d0e0f0817b41314349 Mon Sep 17 00:00:00 2001 From: Dax Ravi Date: Fri, 5 Feb 2021 14:54:41 -0500 Subject: [PATCH] Release package/elixir 0.5.0-beta7 --- packages/elixir/lib/riptide/connection/server.ex | 10 ++++++++++ packages/elixir/mix.exs | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/elixir/lib/riptide/connection/server.ex b/packages/elixir/lib/riptide/connection/server.ex index c45e162..4f5d658 100644 --- a/packages/elixir/lib/riptide/connection/server.ex +++ b/packages/elixir/lib/riptide/connection/server.ex @@ -36,6 +36,11 @@ defmodule Riptide.Websocket.Server do } end + def websocket_init(state) do + :timer.send_interval(:timer.seconds(10), self(), :gc) + {:ok, state} + end + def websocket_handle({:text, msg}, state) do case Riptide.Processor.process_data(msg, state) do {:reply, val, next} -> {:reply, {:text, val}, next} @@ -57,6 +62,11 @@ defmodule Riptide.Websocket.Server do {:reply, {:text, data}, next} end + def websocket_info(:gc, state) do + :erlang.garbage_collect(self()) |> IO.inspect() + {:ok, state} + end + def websocket_info(msg, state) do case Riptide.Processor.process_info(msg, state) do {:reply, val, next} -> {:reply, {:text, val}, next} diff --git a/packages/elixir/mix.exs b/packages/elixir/mix.exs index 16b69ef..c5b9140 100644 --- a/packages/elixir/mix.exs +++ b/packages/elixir/mix.exs @@ -1,6 +1,6 @@ defmodule Riptide.MixProject do use Mix.Project - @version "0.5.0-beta5" + @version "0.5.0-beta7" def project do [