Select fabric carrier by endpoint
This commit is contained in:
@@ -4447,7 +4447,7 @@ func fabricSessionGatewayTransportForAssignment(ctx context.Context, identity st
|
||||
if meshState.VPNFabricTransport == nil {
|
||||
meshState.VPNFabricTransport = mesh.NewWebSocketFabricTransport(meshState.VPNFabricSessionPeers)
|
||||
}
|
||||
session, err := meshState.VPNFabricTransport.Connect(dialCtx, mesh.FabricTransportTarget{
|
||||
target := mesh.FabricTransportTarget{
|
||||
PeerID: nextHop,
|
||||
Endpoint: endpoint,
|
||||
Token: fabricSessionGatewayToken(identity, assignment, nextHop),
|
||||
@@ -4455,7 +4455,13 @@ func fabricSessionGatewayTransportForAssignment(ctx context.Context, identity st
|
||||
OutboundBuffer: 256,
|
||||
InboundBuffer: 256,
|
||||
ErrorBuffer: 16,
|
||||
})
|
||||
}
|
||||
carrier, target, err := mesh.FabricTransportForTarget(target, meshState.VPNFabricTransport, nil)
|
||||
if err != nil {
|
||||
log.Printf("vpn fabric session transport skipped: vpn_connection_id=%s next_hop=%s reason=transport_select_failed error=%v", assignment.VPNConnectionID, nextHop, err)
|
||||
return nil
|
||||
}
|
||||
session, err := carrier.Connect(dialCtx, target)
|
||||
if err != nil {
|
||||
log.Printf("vpn fabric session transport skipped: vpn_connection_id=%s next_hop=%s reason=session_open_failed error=%v", assignment.VPNConnectionID, nextHop, err)
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user