mirror of
https://github.com/jech/galene.git
synced 2024-11-22 16:45:58 +01:00
Maintain a reference to client in disk connections.
This commit is contained in:
parent
d43a2b0104
commit
d9dbb50bf5
1 changed files with 4 additions and 2 deletions
|
@ -119,7 +119,7 @@ func (client *Client) PushConn(g *group.Group, id string, up conn.Up, tracks []c
|
|||
client.down = make(map[string]*diskConn)
|
||||
}
|
||||
|
||||
down, err := newDiskConn(directory, label, up, tracks)
|
||||
down, err := newDiskConn(client, directory, label, up, tracks)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -129,6 +129,7 @@ func (client *Client) PushConn(g *group.Group, id string, up conn.Up, tracks []c
|
|||
}
|
||||
|
||||
type diskConn struct {
|
||||
client *Client
|
||||
directory string
|
||||
label string
|
||||
hasVideo bool
|
||||
|
@ -218,8 +219,9 @@ type diskTrack struct {
|
|||
lastKf uint32
|
||||
}
|
||||
|
||||
func newDiskConn(directory, label string, up conn.Up, remoteTracks []conn.UpTrack) (*diskConn, error) {
|
||||
func newDiskConn(client *Client, directory, label string, up conn.Up, remoteTracks []conn.UpTrack) (*diskConn, error) {
|
||||
conn := diskConn{
|
||||
client: client,
|
||||
directory: directory,
|
||||
label: label,
|
||||
tracks: make([]*diskTrack, 0, len(remoteTracks)),
|
||||
|
|
Loading…
Reference in a new issue