summaryrefslogtreecommitdiff
path: root/src
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
commit159f2624555f552059ed855910ec538bc01352ff (patch)
treeb53afe35f68f28c732cf558ac6c6104508061943 /src
parenta8b7441c5a8565e71f62d804ac3ac35a296a7ea6 (diff)
downloadrabbitmq-server-git-159f2624555f552059ed855910ec538bc01352ff.tar.gz
make reader react to flow control sooner
...by blocking when encountering content headers/body frames, rather than method frames of content-bearing commands.
Diffstat (limited to 'src')
-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 83622a9f97..079de5e1d6 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.