Skip to content

Commit 250eb10

Browse files
committed
AMQP 0.9: Send the connection.open_ok after all init
This is an attempt to solve flakes WIP
1 parent ee578e8 commit 250eb10

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

deps/rabbit/src/rabbit_reader.erl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1252,7 +1252,6 @@ handle_method0(#'connection.open'{virtual_host = VHost},
12521252
ok = rabbit_access_control:check_vhost_access(User, VHost, {socket, Sock}, #{}),
12531253
ok = is_vhost_alive(VHost, User),
12541254
NewConnection = Connection#connection{vhost = VHost},
1255-
ok = send_on_channel0(Sock, #'connection.open_ok'{}, Protocol),
12561255

12571256
Alarms = rabbit_alarm:register(self(), {?MODULE, conserve_resources, []}),
12581257
BlockedBy = sets:from_list([{resource, Alarm} || Alarm <- Alarms]),
@@ -1276,6 +1275,9 @@ handle_method0(#'connection.open'{virtual_host = VHost},
12761275
rabbit_log_connection:info(
12771276
"connection ~ts: user '~ts' authenticated and granted access to vhost '~ts'",
12781277
[dynamic_connection_name(ConnName), Username, VHost]),
1278+
1279+
ok = send_on_channel0(Sock, #'connection.open_ok'{}, Protocol),
1280+
12791281
State1;
12801282
handle_method0(#'connection.close'{}, State) when ?IS_RUNNING(State) ->
12811283
lists:foreach(fun rabbit_channel:shutdown/1, all_channels()),

0 commit comments

Comments
 (0)