Browse Source

fix: whep gathering failure leaks peer connections

pull/3124/head
Jonathan Martin 2 years ago
parent
commit
8378434519
  1. 8
      internal/protocols/webrtc/whip_client.go

8
internal/protocols/webrtc/whip_client.go

@ -197,7 +197,13 @@ outer: @@ -197,7 +197,13 @@ outer:
}
}
return c.pc.GatherIncomingTracks(ctx, 0)
tracks, err := c.pc.GatherIncomingTracks(ctx, 0)
if err != nil {
c.pc.Close()
return nil, err
}
return tracks, nil
}
// Close closes the client.

Loading…
Cancel
Save