File 0014-turtle_subscriber-add-missed-clause-to-handle_comman.patch of Package turtle

From 9abdc69e8c67b1fc6de8125a7322cc87e3c606b5 Mon Sep 17 00:00:00 2001
From: Led <ledest@gmail.com>
Date: Thu, 22 Nov 2018 18:43:28 +0200
Subject: [PATCH 1/2] turtle_subscriber: add missed clause to handle_commands/3
 (for no_ack)

---
 src/turtle_subscriber.erl | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/turtle_subscriber.erl b/src/turtle_subscriber.erl
index 064c402..e3e2776 100644
--- a/src/turtle_subscriber.erl
+++ b/src/turtle_subscriber.erl
@@ -219,6 +219,8 @@ handle_commands(S, [{reply, Tag, CType, Msg} | Next],
     handle_commands(S, Next, State);
 handle_commands(_S, [{stop, Reason, _Tag} | _Next], #state { no_ack = true } = State) ->
     {stop, Reason, State};
+handle_commands(_S, [{{stop, Reason}, _Tag} | _Next], #state { no_ack = true } = State) ->
+    {stop, Reason, State};
 handle_commands(S, [C | Next], #state { no_ack = true } = State) ->
     lager:warning("Unexpected cmd ~p in no_ack mode is ignored", [C]),
     handle_commands(S, Next, State);
-- 
2.16.4

openSUSE Build Service is sponsored by