Skip to content

Commit 12648bd

Browse files
committed
Re-formatted start/2
1 parent 7db274e commit 12648bd

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

deps/amqp_client/src/amqp_connection.erl

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -157,20 +157,14 @@ start(AmqpParams) ->
157157
%% user specified connection name.
158158
start(AmqpParams, ConnName) when ConnName == undefined; is_binary(ConnName) ->
159159
ensure_started(),
160-
ObfuscateFn = fun credentials_obfuscation:encrypt/1,
161-
ToPropList = fun rabbit_data_coercion:to_proplist/1,
162160
AmqpParams0 =
163161
case AmqpParams of
164162
#amqp_params_direct{password = Password, client_properties = Props} ->
165-
AmqpParams#amqp_params_direct{
166-
password = ObfuscateFn(Password),
167-
client_properties = ToPropList(Props)
168-
};
163+
AmqpParams#amqp_params_direct{password = credentials_obfuscation:encrypt(Password),
164+
client_properties = rabbit_data_coercion:to_proplist(Props)};
169165
#amqp_params_network{password = Password, client_properties = Props} ->
170-
AmqpParams#amqp_params_network{
171-
password = ObfuscateFn(Password),
172-
client_properties = ToPropList(Props)
173-
}
166+
AmqpParams#amqp_params_network{password = credentials_obfuscation:encrypt(Password),
167+
client_properties = rabbit_data_coercion:to_proplist(Props)}
174168
end,
175169
AmqpParams1 =
176170
case AmqpParams0 of

0 commit comments

Comments
 (0)