mirror of
https://github.com/pomerium/pomerium.git
synced 2025-08-03 16:59:22 +02:00
grpc: disable gRPC connection re-use across services (#2515)
This commit is contained in:
parent
526f946097
commit
f5a558d4a0
7 changed files with 63 additions and 60 deletions
|
@ -20,6 +20,8 @@ import (
|
|||
|
||||
const maxEnvoyConfigurationEvents = 50
|
||||
|
||||
var outboundGRPCConnection = new(grpc.CachedOutboundGRPClientConn)
|
||||
|
||||
func (srv *Server) handleEnvoyConfigurationEvent(evt *events.EnvoyConfigurationEvent) {
|
||||
select {
|
||||
case srv.envoyConfigurationEvents <- evt:
|
||||
|
@ -88,7 +90,7 @@ func (srv *Server) getDataBrokerClient(ctx context.Context) (databrokerpb.DataBr
|
|||
return nil, err
|
||||
}
|
||||
|
||||
cc, err := grpc.GetOutboundGRPCClientConn(context.Background(), &grpc.OutboundOptions{
|
||||
cc, err := outboundGRPCConnection.Get(context.Background(), &grpc.OutboundOptions{
|
||||
OutboundPort: cfg.OutboundPort,
|
||||
InstallationID: cfg.Options.InstallationID,
|
||||
ServiceName: cfg.Options.Services,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue