Server: hibernate between requests

This commit is contained in:
Jordan Bracco 2020-05-14 00:36:57 +02:00
parent 654eb6b67f
commit 327afed608

View file

@ -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