1
1
% % 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
4
2
% % at https://www.mozilla.org/en-US/MPL/2.0/
5
3
% %
6
4
% % Software distributed under the License is distributed on an "AS IS"
@@ -801,8 +799,7 @@ open(info, {'DOWN', MonitorRef, process, _OsirisPid, _Reason},
801
799
connection_state = State1 }};
802
800
open (info , heartbeat_send ,
803
801
# statem_data {transport = Transport ,
804
- connection = # stream_connection {socket = S } = Connection ,
805
- connection_state = State }) ->
802
+ connection = # stream_connection {socket = S } = Connection }) ->
806
803
Frame = rabbit_stream_core :frame (heartbeat ),
807
804
case catch send (Transport , S , Frame ) of
808
805
ok ->
@@ -814,9 +811,7 @@ open(info, heartbeat_send,
814
811
stop
815
812
end ;
816
813
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 }) ->
820
815
rabbit_log_connection :debug (" Heartbeat timeout, closing connection" ),
821
816
_C1 = demonitor_all_streams (Connection ),
822
817
stop ;
@@ -851,9 +846,7 @@ open({call, From}, {publishers_info, Items},
851
846
{keep_state_and_data ,
852
847
{reply , From , publishers_infos (Items , Connection )}};
853
848
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 }) ->
857
850
% likely closing call from the management plugin
858
851
rabbit_log_connection :info (" Forcing stream connection ~p closing: ~p " ,
859
852
[self (), Explanation ]),
@@ -1054,10 +1047,7 @@ close_sent(enter, _OldState,
1054
1047
# configuration {connection_negotiation_step_timeout =
1055
1048
StateTimeout }}) ->
1056
1049
{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 {}) ->
1061
1051
rabbit_log_connection :warning (" Closing connection because of timeout in state '~s ' likely due to lack of client action." ,
1062
1052
[? FUNCTION_NAME ]),
1063
1053
stop ;
@@ -1085,8 +1075,7 @@ close_sent(info, {tcp_closed, S}, _StatemData) ->
1085
1075
rabbit_log_connection :debug (" Stream protocol connection socket ~w closed [~w ]" ,
1086
1076
[S , self ()]),
1087
1077
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 {}) ->
1090
1079
rabbit_log_connection :error (" Stream protocol connection socket error: ~p [~w ] [~w ]" ,
1091
1080
[Reason , S , self ()]),
1092
1081
stop ;
0 commit comments