mirror of
https://github.com/pomerium/pomerium.git
synced 2025-05-10 15:47: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
|
@ -3,6 +3,7 @@ package databroker
|
|||
import (
|
||||
"context"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/pomerium/pomerium/config"
|
||||
"github.com/pomerium/pomerium/internal/hashutil"
|
||||
|
@ -208,6 +209,7 @@ func (src *ConfigSource) runUpdater(cfg *config.Config) {
|
|||
Str("outbound_port", cfg.OutboundPort).
|
||||
Strs("databroker_urls", databrokerURLs).
|
||||
Msg("config: starting databroker config source syncer")
|
||||
_ = grpc.WaitForReady(ctx, cc, time.Second*10)
|
||||
_ = syncer.Run(ctx)
|
||||
}()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue