mirror of
https://github.com/pomerium/pomerium.git
synced 2025-08-04 01:09:36 +02:00
grpc: wait for connect to be ready before making calls (#3253)
* grpc: wait for connect to be ready before making calls * make sure to stop the ticker
This commit is contained in:
parent
443f4a01f5
commit
761c17b8ac
5 changed files with 42 additions and 6 deletions
|
@ -80,6 +80,7 @@ func (srv *Server) getDataBrokerClient(ctx context.Context) (databrokerpb.DataBr
|
|||
if err != nil {
|
||||
return nil, fmt.Errorf("controlplane: error creating databroker connection: %w", err)
|
||||
}
|
||||
_ = grpc.WaitForReady(ctx, cc, time.Second*10)
|
||||
client := databrokerpb.NewDataBrokerServiceClient(cc)
|
||||
return client, nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue