1
Fork 0

Don't push incomplete connections.

If a connetion is slow to get established, this would cause it to
be pushed twice, the first time before it is complete.  Thanks to
Roman Koval who noticed the issue.
This commit is contained in:
Juliusz Chroboczek 2020-11-05 20:47:13 +01:00
parent c1920e36b6
commit 7ee8cbc45a
1 changed files with 3 additions and 0 deletions

View File

@ -829,6 +829,9 @@ func clientLoop(c *webClient, ws *websocket.Conn) error {
})
case pushConnsAction:
for _, u := range c.up {
if !u.complete() {
continue
}
tracks := u.getTracks()
ts := make([]conn.UpTrack, len(tracks))
for i, t := range tracks {