mirror of
https://github.com/jech/galene.git
synced 2024-11-25 01:55:57 +01:00
Don't attempt to replace empty connection in disk writer.
This commit is contained in:
parent
b4240c4505
commit
c72cbe8f27
1 changed files with 8 additions and 6 deletions
|
@ -105,12 +105,14 @@ func (client *Client) PushConn(g *group.Group, id string, up conn.Up, tracks []c
|
||||||
return errors.New("disk client is closed")
|
return errors.New("disk client is closed")
|
||||||
}
|
}
|
||||||
|
|
||||||
rp := client.down[replace]
|
if replace != "" {
|
||||||
if rp != nil {
|
rp := client.down[replace]
|
||||||
rp.Close()
|
if rp != nil {
|
||||||
delete(client.down, replace)
|
rp.Close()
|
||||||
} else {
|
delete(client.down, replace)
|
||||||
log.Printf("Replacing unknown connection")
|
} else {
|
||||||
|
log.Printf("Disk writer: replacing unknown connection")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
old := client.down[id]
|
old := client.down[id]
|
||||||
|
|
Loading…
Reference in a new issue