File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
projects/RabbitMQ.Client/client/api Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -723,14 +723,15 @@ private List<AmqpTcpEndpoint> LocalEndpoints()
723
723
724
724
private static string EnsureClientProvidedNameLength ( string clientProvidedName )
725
725
{
726
- if ( clientProvidedName . Length > InternalConstants . DefaultRabbitMqMaxClientProvideNameLength )
726
+ if ( clientProvidedName != null )
727
727
{
728
- return clientProvidedName . Substring ( 0 , InternalConstants . DefaultRabbitMqMaxClientProvideNameLength ) ;
729
- }
730
- else
731
- {
732
- return clientProvidedName ;
728
+ if ( clientProvidedName . Length > InternalConstants . DefaultRabbitMqMaxClientProvideNameLength )
729
+ {
730
+ return clientProvidedName . Substring ( 0 , InternalConstants . DefaultRabbitMqMaxClientProvideNameLength ) ;
731
+ }
733
732
}
733
+
734
+ return clientProvidedName ;
734
735
}
735
736
}
736
737
}
You can’t perform that action at this time.
0 commit comments