@@ -249,7 +249,10 @@ tcp_connected(info, Msg, StateData) ->
249
249
? FUNCTION_NAME ,
250
250
NextConnectionStep )
251
251
end
252
- end ).
252
+ end );
253
+ tcp_connected ({call , From }, {info , _Items }, _StateData ) ->
254
+ % % must be a CLI call, not ready for this
255
+ {keep_state_and_data , {reply , From , []}}.
253
256
254
257
peer_properties_exchanged (enter , _OldState ,
255
258
# statem_data {config =
@@ -282,7 +285,10 @@ peer_properties_exchanged(info, Msg, StateData) ->
282
285
? FUNCTION_NAME ,
283
286
NextConnectionStep )
284
287
end
285
- end ).
288
+ end );
289
+ peer_properties_exchanged ({call , From }, {info , _Items }, _StateData ) ->
290
+ % % must be a CLI call, not ready for this
291
+ {keep_state_and_data , {reply , From , []}}.
286
292
287
293
authenticating (enter , _OldState ,
288
294
# statem_data {config =
@@ -323,7 +329,10 @@ authenticating(info, Msg, StateData) ->
323
329
? FUNCTION_NAME ,
324
330
NextConnectionStep )
325
331
end
326
- end ).
332
+ end );
333
+ authenticating ({call , From }, {info , _Items }, _StateData ) ->
334
+ % % must be a CLI call, not ready for this
335
+ {keep_state_and_data , {reply , From , []}}.
327
336
328
337
tuning (enter , _OldState ,
329
338
# statem_data {config =
@@ -360,7 +369,10 @@ tuning(info, Msg, StateData) ->
360
369
? FUNCTION_NAME ,
361
370
NextConnectionStep )
362
371
end
363
- end ).
372
+ end );
373
+ tuning ({call , From }, {info , _Items }, _StateData ) ->
374
+ % % must be a CLI call, not ready for this
375
+ {keep_state_and_data , {reply , From , []}}.
364
376
365
377
tuned (enter , _OldState ,
366
378
# statem_data {config =
@@ -390,7 +402,10 @@ tuned(info, Msg, StateData) ->
390
402
? FUNCTION_NAME ,
391
403
NextConnectionStep )
392
404
end
393
- end ).
405
+ end );
406
+ tuned ({call , From }, {info , _Items }, _StateData ) ->
407
+ % % must be a CLI call, not ready for this
408
+ {keep_state_and_data , {reply , From , []}}.
394
409
395
410
state_timeout (State , Transport , Socket ) ->
396
411
rabbit_log_connection :warning (" Closing connection because of timeout in state "
@@ -1185,7 +1200,11 @@ close_sent(info, {resource_alarm, IsThereAlarm},
1185
1200
close_sent (info , Msg , _StatemData ) ->
1186
1201
rabbit_log_connection :warning (" Ignored unknown message ~tp in state ~ts " ,
1187
1202
[Msg , ? FUNCTION_NAME ]),
1188
- keep_state_and_data .
1203
+ keep_state_and_data ;
1204
+ close_sent ({call , From }, {info , _Items }, _StateData ) ->
1205
+ % % must be a CLI call, returning no information
1206
+ {keep_state_and_data , {reply , From , []}}.
1207
+
1189
1208
1190
1209
handle_inbound_data_pre_auth (Transport , Connection , State , Data ) ->
1191
1210
handle_inbound_data (Transport ,
@@ -3761,8 +3780,14 @@ ensure_stats_timer(Connection = #stream_connection{}) ->
3761
3780
rabbit_event :ensure_stats_timer (Connection ,
3762
3781
# stream_connection .stats_timer , emit_stats ).
3763
3782
3764
- in_vhost (_Pid , undefined ) ->
3765
- true ;
3783
+ in_vhost (Pid , undefined ) ->
3784
+ % % no vhost filter, but check the connection is in open state and can return information
3785
+ case info (Pid , [vhost ]) of
3786
+ [{vhost , _ }] ->
3787
+ true ;
3788
+ _ ->
3789
+ false
3790
+ end ;
3766
3791
in_vhost (Pid , VHost ) ->
3767
3792
case info (Pid , [vhost ]) of
3768
3793
[{vhost , VHost }] ->
0 commit comments