Skip to content

Commit 71ea2d5

Browse files
author
Emile Joubert
committed
Readable exception message if no compatible SASL mechanisms found
1 parent 565b5c6 commit 71ea2d5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

projects/client/RabbitMQ.Client/src/client/impl/ConnectionBase.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1008,11 +1008,12 @@ protected void StartAndTune()
10081008
bool tuned = false;
10091009
try
10101010
{
1011-
string[] mechanisms = Encoding.UTF8.GetString(connectionStart.m_mechanisms).Split(' ');
1011+
string mechanismsString = Encoding.UTF8.GetString(connectionStart.m_mechanisms);
1012+
string[] mechanisms = mechanismsString.Split(' ');
10121013
AuthMechanismFactory mechanismFactory = m_factory.AuthMechanismFactory(mechanisms);
10131014
if (mechanismFactory == null) {
10141015
throw new IOException("No compatible authentication mechanism found - " +
1015-
"server offered [" + connectionStart.m_mechanisms + "]");
1016+
"server offered [" + mechanismsString + "]");
10161017
}
10171018
AuthMechanism mechanism = mechanismFactory.GetInstance();
10181019
byte[] challenge = null;

0 commit comments

Comments
 (0)