Skip to content

Commit 9e45060

Browse files
committed
fix build warnings
1 parent 135575b commit 9e45060

File tree

1 file changed

+5
-16
lines changed

1 file changed

+5
-16
lines changed

deps/rabbitmq_stream/src/rabbit_stream_reader.erl

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
%% The contents of this file are subject to the Mozilla Public License
2-
%% Version 2.0 (the "License"); you may not use this file except in
3-
%% compliance with the License. You may obtain a copy of the License
42
%% at https://www.mozilla.org/en-US/MPL/2.0/
53
%%
64
%% Software distributed under the License is distributed on an "AS IS"
@@ -801,8 +799,7 @@ open(info, {'DOWN', MonitorRef, process, _OsirisPid, _Reason},
801799
connection_state = State1}};
802800
open(info, heartbeat_send,
803801
#statem_data{transport = Transport,
804-
connection = #stream_connection{socket = S} = Connection,
805-
connection_state = State}) ->
802+
connection = #stream_connection{socket = S} = Connection}) ->
806803
Frame = rabbit_stream_core:frame(heartbeat),
807804
case catch send(Transport, S, Frame) of
808805
ok ->
@@ -814,9 +811,7 @@ open(info, heartbeat_send,
814811
stop
815812
end;
816813
open(info, heartbeat_timeout,
817-
#statem_data{transport = Transport,
818-
connection = #stream_connection{socket = S} = Connection,
819-
connection_state = State}) ->
814+
#statem_data{connection = #stream_connection{} = Connection}) ->
820815
rabbit_log_connection:debug("Heartbeat timeout, closing connection"),
821816
_C1 = demonitor_all_streams(Connection),
822817
stop;
@@ -851,9 +846,7 @@ open({call, From}, {publishers_info, Items},
851846
{keep_state_and_data,
852847
{reply, From, publishers_infos(Items, Connection)}};
853848
open({call, From}, {shutdown, Explanation},
854-
#statem_data{transport = Transport,
855-
connection = #stream_connection{socket = S} = Connection,
856-
connection_state = State}) ->
849+
#statem_data{connection = Connection}) ->
857850
% likely closing call from the management plugin
858851
rabbit_log_connection:info("Forcing stream connection ~p closing: ~p",
859852
[self(), Explanation]),
@@ -1054,10 +1047,7 @@ close_sent(enter, _OldState,
10541047
#configuration{connection_negotiation_step_timeout =
10551048
StateTimeout}}) ->
10561049
{keep_state_and_data, {state_timeout, StateTimeout, close}};
1057-
close_sent(state_timeout, close,
1058-
#statem_data{transport = Transport,
1059-
connection = #stream_connection{socket = Socket},
1060-
connection_state = State}) ->
1050+
close_sent(state_timeout, close, #statem_data{}) ->
10611051
rabbit_log_connection:warning("Closing connection because of timeout in state '~s' likely due to lack of client action.",
10621052
[?FUNCTION_NAME]),
10631053
stop;
@@ -1085,8 +1075,7 @@ close_sent(info, {tcp_closed, S}, _StatemData) ->
10851075
rabbit_log_connection:debug("Stream protocol connection socket ~w closed [~w]",
10861076
[S, self()]),
10871077
stop;
1088-
close_sent(info, {tcp_error, S, Reason},
1089-
#statem_data{transport = Transport, connection_state = State}) ->
1078+
close_sent(info, {tcp_error, S, Reason}, #statem_data{}) ->
10901079
rabbit_log_connection:error("Stream protocol connection socket error: ~p [~w] [~w]",
10911080
[Reason, S, self()]),
10921081
stop;

0 commit comments

Comments
 (0)