diff options
| author | Matthias Radestock <matthias@rabbitmq.com> | 2012-12-28 14:30:10 +0000 |
|---|---|---|
| committer | Matthias Radestock <matthias@rabbitmq.com> | 2012-12-28 14:30:10 +0000 |
| commit | 159f2624555f552059ed855910ec538bc01352ff (patch) | |
| tree | b53afe35f68f28c732cf558ac6c6104508061943 /src | |
| parent | a8b7441c5a8565e71f62d804ac3ac35a296a7ea6 (diff) | |
| download | rabbitmq-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.erl | 11 |
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. |
