Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sfu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alain Takoudjou
sfu
Commits
96dbcd9d
Commit
96dbcd9d
authored
Sep 13, 2020
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Release lock early in newUpConn.
Otherwise recording to disk causes a deadlock.
parent
fa29e50f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
rtpconn.go
rtpconn.go
+10
-3
No files found.
rtpconn.go
View file @
96dbcd9d
...
@@ -400,7 +400,6 @@ func newUpConn(c client, id string) (*rtpUpConnection, error) {
...
@@ -400,7 +400,6 @@ func newUpConn(c client, id string) (*rtpUpConnection, error) {
pc
.
OnTrack
(
func
(
remote
*
webrtc
.
Track
,
receiver
*
webrtc
.
RTPReceiver
)
{
pc
.
OnTrack
(
func
(
remote
*
webrtc
.
Track
,
receiver
*
webrtc
.
RTPReceiver
)
{
conn
.
mu
.
Lock
()
conn
.
mu
.
Lock
()
defer
conn
.
mu
.
Unlock
()
mid
:=
getTrackMid
(
pc
,
remote
)
mid
:=
getTrackMid
(
pc
,
remote
)
if
mid
==
""
{
if
mid
==
""
{
...
@@ -435,11 +434,19 @@ func newUpConn(c client, id string) (*rtpUpConnection, error) {
...
@@ -435,11 +434,19 @@ func newUpConn(c client, id string) (*rtpUpConnection, error) {
go
rtcpUpListener
(
conn
,
track
,
receiver
)
go
rtcpUpListener
(
conn
,
track
,
receiver
)
if
conn
.
complete
()
{
complete
:=
conn
.
complete
()
tracks
:=
make
([]
upTrack
,
len
(
conn
.
tracks
))
var
tracks
[]
upTrack
if
(
complete
)
{
tracks
=
make
([]
upTrack
,
len
(
conn
.
tracks
))
for
i
,
t
:=
range
conn
.
tracks
{
for
i
,
t
:=
range
conn
.
tracks
{
tracks
[
i
]
=
t
tracks
[
i
]
=
t
}
}
}
// pushConn might need to take the lock
conn
.
mu
.
Unlock
()
if
complete
{
clients
:=
c
.
Group
()
.
getClients
(
c
)
clients
:=
c
.
Group
()
.
getClients
(
c
)
for
_
,
cc
:=
range
clients
{
for
_
,
cc
:=
range
clients
{
cc
.
pushConn
(
conn
.
id
,
conn
,
tracks
,
conn
.
label
)
cc
.
pushConn
(
conn
.
id
,
conn
,
tracks
,
conn
.
label
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment