1
Fork 0
mirror of https://github.com/jech/galene.git synced 2024-11-26 10:35:59 +01:00

Log errors from PushConn.

This commit is contained in:
Juliusz Chroboczek 2020-12-04 12:15:37 +01:00
parent ca6c371ec4
commit e3098899e1

View file

@ -258,7 +258,10 @@ func delUpConn(c *webClient, id string) bool {
if g != nil { if g != nil {
go func(clients []group.Client) { go func(clients []group.Client) {
for _, c := range clients { for _, c := range clients {
c.PushConn(conn.id, nil, nil, "") err := c.PushConn(conn.id, nil, nil, "")
if err != nil {
log.Printf("PushConn: %v", err)
}
} }
}(g.GetClients(c)) }(g.GetClients(c))
} else { } else {
@ -827,7 +830,17 @@ func clientLoop(c *webClient, ws *websocket.Conn) error {
for i, t := range tracks { for i, t := range tracks {
ts[i] = t ts[i] = t
} }
go a.c.PushConn(u.id, u, ts, u.label) go func() {
err := a.c.PushConn(
u.id, u, ts, u.label,
)
if err != nil {
log.Printf(
"PushConn: %v",
err,
)
}
}()
} }
case connectionFailedAction: case connectionFailedAction:
if down := getDownConn(c, a.id); down != nil { if down := getDownConn(c, a.id); down != nil {