summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon MacMullen <simon@rabbitmq.com>2010-06-22 18:09:50 +0100
committerSimon MacMullen <simon@rabbitmq.com>2010-06-22 18:09:50 +0100
commitbec07b9dda4770e4c5a98057856b1469738ba403 (patch)
tree2b476e6bd2f761a1c33427cd6b89eb7f2e4f308a
parent5c7936831d25fb5ad2cb0afce2a31311a54e2779 (diff)
downloadrabbitmq-server-git-bec07b9dda4770e4c5a98057856b1469738ba403.tar.gz
Or maybe we do want a protocol_error, but let's use a real one.
-rw-r--r--src/rabbit_reader.erl7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/rabbit_reader.erl b/src/rabbit_reader.erl
index 939efbbda3..ba41256295 100644
--- a/src/rabbit_reader.erl
+++ b/src/rabbit_reader.erl
@@ -622,13 +622,14 @@ handle_method0(#'connection.tune_ok'{channel_max = _ChannelMax,
sock = Sock}) ->
if (FrameMax =< ?FRAME_MIN_SIZE) or
(?FRAME_MAX /= 0) and (FrameMax > ?FRAME_MAX) ->
- exit(peer_sent_tune_ok_with_invalid_frame_max);
- %% If we have a channel_max limit that the client wishes to
+ rabbit_misc:protocol_error(
+ not_allowed, "peer sent tune_ok with invalid frame_max", []);
%% If we have a channel_max limit that the client wishes to
%% exceed, die as per spec. Not currently a problem, so we ignore
%% the client's channel_max parameter.
%%(?CHANNEL_MAX /= 0) and (ChannelMax > ?CHANNEL_MAX) ->
- %% exit(peer_sent_tune_ok_with_invalid_channel_max);
+ %% rabbit_misc:protocol_error(
+ %% not_allowed, "peer sent tune_ok with invalid channel_max");
true ->
rabbit_heartbeat:start_heartbeat(Sock, ClientHeartbeat),
State#v1{connection_state = opening,