diff options
author | Matthias Radestock <matthias@rabbitmq.com> | 2010-06-24 12:25:16 +0100 |
---|---|---|
committer | Matthias Radestock <matthias@rabbitmq.com> | 2010-06-24 12:25:16 +0100 |
commit | 5583675319290861d2b051bde65459516d4f1ea4 (patch) | |
tree | a5df5bc688b6d1028f48e9adfd8702f6b77381bd | |
parent | 4c73c83cf977550dc51ed188849409bccc1c1251 (diff) | |
download | rabbitmq-server-5583675319290861d2b051bde65459516d4f1ea4.tar.gz |
shut up compiler
-rw-r--r-- | src/rabbit_reader.erl | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/rabbit_reader.erl b/src/rabbit_reader.erl index 31c42b59..fb49fb7b 100644 --- a/src/rabbit_reader.erl +++ b/src/rabbit_reader.erl @@ -55,6 +55,8 @@ -define(SILENT_CLOSE_DELAY, 3). %% set to zero once QPid fix their negotiation -define(FRAME_MAX, 131072). +%% NB: when setting this to non-zero the section of code in the +%% connection.tune_ok handler below needs to be uncommented -define(CHANNEL_MAX, 0). %--------------------------------------------------------------------------- @@ -628,10 +630,15 @@ handle_method0(#'connection.tune_ok'{channel_max = ChannelMax, rabbit_misc:protocol_error( not_allowed, "frame_max ~w larger than ~w", [FrameMax, ?FRAME_MAX]); - (?CHANNEL_MAX /= 0) and (ChannelMax > ?CHANNEL_MAX) -> - rabbit_misc:protocol_error( - not_allowed, "channel_max ~w larger than ~w", - [ChannelMax, ?CHANNEL_MAX]); + %% The following is commented out in order to suppress compiler + %% warnings about unreachable code. If CHANNEL_MAX is ever + %% changed to a value other than 0 this region should be + %% uncommented. + %% + %% (?CHANNEL_MAX /= 0) and (ChannelMax > ?CHANNEL_MAX) -> + %% rabbit_misc:protocol_error( + %% not_allowed, "channel_max ~w larger than ~w", + %% [ChannelMax, ?CHANNEL_MAX]); true -> rabbit_heartbeat:start_heartbeat(Sock, ClientHeartbeat), State#v1{connection_state = opening, |