examples: break from 'PerRPCCredsCallOption' status checking loop (#3772)
If *grpc.PerRPCCredsCallOption is not found in the option array then change credentialConfigStatus to true and break from the loop. No need to iterate further.
This commit is contained in:
@ -93,6 +93,7 @@ func streamInterceptor(ctx context.Context, desc *grpc.StreamDesc, cc *grpc.Clie
|
||||
_, ok := o.(*grpc.PerRPCCredsCallOption)
|
||||
if ok {
|
||||
credsConfigured = true
|
||||
break
|
||||
}
|
||||
}
|
||||
if !credsConfigured {
|
||||
|
Reference in New Issue
Block a user