1
Fork 0
mirror of https://github.com/jech/galene.git synced 2024-12-22 23:35:46 +01:00

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

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 {