diff --git a/VERSION b/VERSION index 40e713d5..c1847bf9 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.1.30 +1.1.31 diff --git a/lib/supavisor/protocol/client.ex b/lib/supavisor/protocol/client.ex index b47fe128..b9a3c966 100644 --- a/lib/supavisor/protocol/client.ex +++ b/lib/supavisor/protocol/client.ex @@ -65,7 +65,7 @@ defmodule Supavisor.Protocol.Client do def decode_pkt(_), do: {:error, :header_mismatch} - @spec get_payload(binary) :: {:ok, String.t()} | {:error, any} + @spec get_payload(binary | any()) :: {:ok, String.t()} | {:error, any} def get_payload(<>) do case tag(char) do nil -> @@ -84,6 +84,8 @@ defmodule Supavisor.Protocol.Client do end end + def get_payload(msg), do: {:error, {:invalid_msg, msg}} + @spec tag(byte) :: atom | nil def tag(char) do case char do