From 327afed608124ae6cade86fd94e343d588aeed2a Mon Sep 17 00:00:00 2001 From: Jordan Bracco Date: Thu, 14 May 2020 00:36:57 +0200 Subject: [PATCH] Server: hibernate between requests --- lib/gen_magic/server.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/gen_magic/server.ex b/lib/gen_magic/server.ex index 3b414d4..5eaed86 100644 --- a/lib/gen_magic/server.ex +++ b/lib/gen_magic/server.ex @@ -248,7 +248,7 @@ defmodule GenMagic.Server do data = %{data | request: nil} response = {:reply, from, handle_response(response)} next_state = (data.cycles >= data.recycle_threshold && :recycling) || :available - {:next_state, next_state, data, response} + {:next_state, next_state, data, [response, :hibernate]} end @doc false