From ec7968f1f49c00dc9e52feabf809ea181cfba93e Mon Sep 17 00:00:00 2001 From: Andrey Fadeev Date: Wed, 17 Jul 2019 12:51:45 +0300 Subject: [PATCH] Fix machinegun timer marshaling (#14) The timeout can be not only pos integer in machiengun protocol. --- src/machinery_mg_backend.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/machinery_mg_backend.erl b/src/machinery_mg_backend.erl index 9a553a0..289f347 100644 --- a/src/machinery_mg_backend.erl +++ b/src/machinery_mg_backend.erl @@ -325,7 +325,7 @@ marshal(action, V) when is_list(V) -> marshal(action, V) -> marshal(action, [V]); -marshal(timer, {timeout, V}) when V > 0 -> +marshal(timer, {timeout, V}) -> {timeout, marshal(integer, V)}; marshal(timer, {deadline, V}) ->