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 | 29c0652d733d148239f7dc25bd35f36133b12c5d (patch) | |
| tree | a5df5bc688b6d1028f48e9adfd8702f6b77381bd | |
| parent | b21fd7fac3c80b1f5837feb1005c91de90fe53cf (diff) | |
| download | rabbitmq-server-git-29c0652d733d148239f7dc25bd35f36133b12c5d.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 31c42b5985..fb49fb7b19 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, |
