summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Radestock <matthias@rabbitmq.com>2012-12-28 14:30:10 +0000
committerMatthias Radestock <matthias@rabbitmq.com>2012-12-28 14:30:10 +0000
commit30b9c29d9eafabcdcf0f6defdb49719b7de0b812 (patch)
treeb53afe35f68f28c732cf558ac6c6104508061943
parent0c29586f868cbe57f5bc86e7d617941a9ef2d0cc (diff)
downloadrabbitmq-server-bug25367.tar.gz
make reader react to flow control soonerbug25367
...by blocking when encountering content headers/body frames, rather than method frames of content-bearing commands.
-rw-r--r--src/rabbit_reader.erl11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/rabbit_reader.erl b/src/rabbit_reader.erl
index 83622a9f..079de5e1 100644
--- a/src/rabbit_reader.erl
+++ b/src/rabbit_reader.erl
@@ -617,13 +617,10 @@ process_frame(Frame, Channel, State) ->
post_process_frame({method, 'channel.close_ok', _}, ChPid, State) ->
channel_cleanup(ChPid),
State;
-post_process_frame({method, MethodName, _}, _ChPid,
- State = #v1{connection = #connection{
- protocol = Protocol}}) ->
- case Protocol:method_has_content(MethodName) of
- true -> maybe_block(State);
- false -> State
- end;
+post_process_frame({content_header, _, _, _, _}, _ChPid, State) ->
+ maybe_block(State);
+post_process_frame({content_body, _}, _ChPid, State) ->
+ maybe_block(State);
post_process_frame(_Frame, _ChPid, State) ->
State.