diff options
author | Simon MacMullen <simon@rabbitmq.com> | 2013-12-04 14:58:48 +0000 |
---|---|---|
committer | Simon MacMullen <simon@rabbitmq.com> | 2013-12-04 14:58:48 +0000 |
commit | 1fed52383f8a7a6fcec748af24f153ceb09ca2f5 (patch) | |
tree | ace02779fb654a65804cb4db9b70254f8d55b2c0 | |
parent | fdfe9457f14e9afb9fe01710ed8f2ac7a16ae078 (diff) | |
download | rabbitmq-server-1fed52383f8a7a6fcec748af24f153ceb09ca2f5.tar.gz |
Cosmetic
-rw-r--r-- | src/rabbit_reader.erl | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/src/rabbit_reader.erl b/src/rabbit_reader.erl index d4bc1fa0..4cba5dc8 100644 --- a/src/rabbit_reader.erl +++ b/src/rabbit_reader.erl @@ -615,10 +615,8 @@ create_channel(Channel, State) -> case ChannelMax /= 0 andalso N + 1 > ChannelMax of true -> Err = rabbit_misc:amqp_error( - not_allowed, - "number of channels opened (~w) has reached " - ++ "the negotiated channel_max (~w)", - [N, ChannelMax], 'none'), + not_allowed, "number of channels opened (~w) has reached " + "the negotiated channel_max (~w)", [N, ChannelMax], 'none'), {error, Err}; false -> {ok, _ChSupPid, {ChPid, AState}} = @@ -678,15 +676,13 @@ handle_frame(Type, Channel, Payload, State) -> process_frame(Frame, Channel, State) -> ChKey = {channel, Channel}, Ch = case get(ChKey) of - undefined -> create_channel(Channel, State); - Other -> Other - end, + undefined -> create_channel(Channel, State); + Other -> Other + end, case Ch of {error, Error} -> - handle_exception(State, - Channel, - Error); - {ChPid, AState} -> + handle_exception(State, Channel, Error); + {ChPid, AState} -> case rabbit_command_assembler:process(Frame, AState) of {ok, NewAState} -> put(ChKey, {ChPid, NewAState}), @@ -943,10 +939,10 @@ validate_negotiated_integer_value(Field, Min, ClientValue) -> end. fail_negotiation(Field, MinOrMax, ServerValue, ClientValue) -> - {S1,S2} = case MinOrMax of - min -> {lower, minimum}; - max -> {higher, maximum} - end, + {S1, S2} = case MinOrMax of + min -> {lower, minimum}; + max -> {higher, maximum} + end, rabbit_misc:protocol_error( not_allowed, "negotiated ~w = ~w is ~w than the ~w allowed value (~w)", [Field, ClientValue, S1, S2, ServerValue], 'connection.tune'). |