diff options
| -rw-r--r-- | src/rabbit_amqqueue.erl | 4 | ||||
| -rw-r--r-- | src/rabbit_channel.erl | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/rabbit_amqqueue.erl b/src/rabbit_amqqueue.erl index 4abd0cad69..31787466bb 100644 --- a/src/rabbit_amqqueue.erl +++ b/src/rabbit_amqqueue.erl @@ -107,7 +107,7 @@ -spec(basic_cancel/4 :: (amqqueue(), pid(), ctag(), any()) -> 'ok'). -spec(notify_sent/2 :: (pid(), pid()) -> 'ok'). -spec(unblock/2 :: (pid(), pid()) -> 'ok'). --spec(flush_all/2 :: (pid(), [pid()]) -> 'ok'). +-spec(flush_all/2 :: ([pid()], pid()) -> 'ok'). -spec(internal_declare/2 :: (amqqueue(), boolean()) -> amqqueue()). -spec(internal_delete/1 :: (queue_name()) -> 'ok' | not_found()). -spec(on_node_down/1 :: (erlang_node()) -> 'ok'). @@ -335,7 +335,7 @@ notify_sent(QPid, ChPid) -> unblock(QPid, ChPid) -> gen_server2:pcast(QPid, 7, {unblock, ChPid}). -flush_all(ChPid, QPids) -> +flush_all(QPids, ChPid) -> safe_pmap_ok( fun (_) -> ok end, fun (QPid) -> gen_server2:cast(QPid, {flush, ChPid}) end, diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl index 766dbdbe3c..1bfda6d4b2 100644 --- a/src/rabbit_channel.erl +++ b/src/rabbit_channel.erl @@ -831,7 +831,7 @@ handle_method(#'channel.flow'{active = false}, _, ok = rabbit_limiter:block(LimiterPid1), QPids = consumer_queues(Consumers), Queues = [{QPid, erlang:monitor(process, QPid)} || QPid <- QPids], - ok = rabbit_amqqueue:flush_all(self(), QPids), + ok = rabbit_amqqueue:flush_all(QPids, self()), case Queues =:= [] of true -> {reply, #'channel.flow_ok'{active = false}, State}; false -> {noreply, State#ch{limiter_pid = LimiterPid1, |
