1
Fork 0
mirror of https://github.com/jech/galene.git synced 2024-12-22 15:25:48 +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 {
go func(clients []group.Client) {
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))
} else {
@ -827,7 +830,17 @@ func clientLoop(c *webClient, ws *websocket.Conn) error {
for i, t := range tracks {
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:
if down := getDownConn(c, a.id); down != nil {