Fix the selection of the local endpoint for stream forwarding

This commit is contained in:
Dmitrii Okunev
2024-10-19 17:21:55 +01:00
parent aa22de6eff
commit b084ea8e1b
22 changed files with 338 additions and 295 deletions

View File

@@ -61,13 +61,16 @@ func (c *Client) NewInputFromURL(
url string,
authKey string,
config InputConfig,
) (InputID, error) {
) (_ InputID, _err error) {
client, conn, err := c.grpcClient()
if err != nil {
return 0, err
}
defer conn.Close()
logger.Debugf(ctx, "NewInputFromURL(ctx, '%s', authKey, %#+v)", url, authKey)
defer func() { logger.Debugf(ctx, "/NewInputFromURL(ctx, '%s', authKey, %#+v): %v", url, authKey, _err) }()
resp, err := client.NewInput(ctx, &recoder_grpc.NewInputRequest{
Path: &recoder_grpc.ResourcePath{
ResourcePath: &recoder_grpc.ResourcePath_Url{