Skip to content

Commit

Permalink
Force socket options to include 'binary'
Browse files Browse the repository at this point in the history
To support versions older than 3.6.0 which are, ahem,
out of any kind of support.

Ranch, a TCP acceptor library adopted in 3.6.0,
forces binary and a few other TCP listener options.

Closes rabbitmq#488.
  • Loading branch information
michaelklishin committed Mar 1, 2018
1 parent 8550a27 commit 1aa9dc4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions templates/default/rabbitmq.config.erb
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@
<% end -%>

<% if node['rabbitmq']['tcp_listen'] -%>
{tcp_listen_options, [{packet, <%= node['rabbitmq']['tcp_listen_packet'] %>},
{tcp_listen_options, [binary,
{packet, <%= node['rabbitmq']['tcp_listen_packet'] %>},
{reuseaddr, <%= node['rabbitmq']['tcp_listen_reuseaddr'] %>},
{backlog, <%= node['rabbitmq']['tcp_listen_backlog'] %>},
{nodelay, <%= node['rabbitmq']['tcp_listen_nodelay'] %>},
Expand All @@ -94,7 +95,7 @@

{linger, {<%= node['rabbitmq']['tcp_listen_linger'] %>,<%= node['rabbitmq']['tcp_listen_linger_timeout'] %>}}]},
<% else -%>
{tcp_listen_options, []},
{tcp_listen_options, [binary]},
<% end %>

<% if node['rabbitmq']['log_levels'] -%>
Expand Down

0 comments on commit 1aa9dc4

Please sign in to comment.