Skip to content

Commit 56c7a0d

Browse files
Merge pull request #8533 from rabbitmq/replace_state
gen_server2: OTP27 compatibility
2 parents aa1bc50 + b8d5d15 commit 56c7a0d

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

deps/rabbit_common/src/gen_server2.erl

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -805,18 +805,7 @@ in(Input, Priority, GS2State = #gs2_state { queue = Queue }) ->
805805

806806
process_msg({system, From, Req},
807807
GS2State = #gs2_state { parent = Parent, debug = Debug }) ->
808-
case Req of
809-
%% This clause will match only in R16B03.
810-
%% Since 17.0 replace_state is not a system message.
811-
{replace_state, StateFun} ->
812-
GS2State1 = StateFun(GS2State),
813-
_ = gen:reply(From, GS2State1),
814-
system_continue(Parent, Debug, GS2State1);
815-
_ ->
816-
%% gen_server puts Hib on the end as the 7th arg, but that version
817-
%% of the fun seems not to be documented so leaving out for now.
818-
sys:handle_system_msg(Req, From, Parent, ?MODULE, Debug, GS2State)
819-
end;
808+
sys:handle_system_msg(Req, From, Parent, ?MODULE, Debug, GS2State);
820809
process_msg({'$with_state', From, Fun},
821810
GS2State = #gs2_state{state = State}) ->
822811
reply(From, catch Fun(State)),

0 commit comments

Comments
 (0)