diff options
Diffstat (limited to 'src/rabbit_direct.erl')
-rw-r--r-- | src/rabbit_direct.erl | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/rabbit_direct.erl b/src/rabbit_direct.erl index 88d9baad..2cc0c1da 100644 --- a/src/rabbit_direct.erl +++ b/src/rabbit_direct.erl @@ -16,7 +16,7 @@ -module(rabbit_direct). --export([boot/0, connect/3, start_channel/6]). +-export([boot/0, connect/4, start_channel/6]). -include("rabbit.hrl"). @@ -25,7 +25,7 @@ -ifdef(use_specs). -spec(boot/0 :: () -> 'ok'). --spec(connect/3 :: (binary(), binary(), binary()) -> +-spec(connect/4 :: (binary(), binary(), binary(), rabbit_types:protocol()) -> {'ok', {rabbit_types:user(), rabbit_framing:amqp_table()}}). -spec(start_channel/6 :: @@ -50,13 +50,14 @@ boot() -> %%---------------------------------------------------------------------------- -connect(Username, Password, VHost) -> +connect(Username, Password, VHost, Protocol) -> case lists:keymember(rabbit, 1, application:which_applications()) of true -> try rabbit_access_control:user_pass_login(Username, Password) of #user{} = User -> try rabbit_access_control:check_vhost_access(User, VHost) of - ok -> {ok, {User, rabbit_reader:server_properties()}} + ok -> {ok, {User, + rabbit_reader:server_properties(Protocol)}} catch exit:#amqp_error{name = access_refused} -> {error, access_refused} |