mirror of https://github.com/grpc/grpc-go.git
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:
parent
f92f534396
commit
b2e49701d9
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue