mirror of https://bitbucket.org/ausocean/av.git
protocol/rtcp/client.go: initialise error chan err in constructor rather than Client.Start() function
This commit is contained in:
parent
8163a956a9
commit
5995f1a815
2
go.mod
2
go.mod
|
@ -3,8 +3,8 @@ module bitbucket.org/ausocean/av
|
|||
go 1.13
|
||||
|
||||
require (
|
||||
bitbuket.org/ausocean/test latest
|
||||
bitbucket.org/ausocean/iot v1.2.7
|
||||
bitbucket.org/ausocean/test v0.0.0-20190821085226-7a524f2344ba
|
||||
bitbucket.org/ausocean/utils v1.2.9
|
||||
github.com/BurntSushi/toml v0.3.1 // indirect
|
||||
github.com/Comcast/gots v0.0.0-20190305015453-8d56e473f0f7
|
||||
|
|
|
@ -81,6 +81,7 @@ func NewClient(clientAddress, serverAddress string, rtpClt *rtp.Client, l Log) (
|
|||
c := &Client{
|
||||
name: defaultClientName,
|
||||
quit: make(chan struct{}),
|
||||
err: make(chan error),
|
||||
interval: defaultSendInterval,
|
||||
rtpClt: rtpClt,
|
||||
log: l,
|
||||
|
@ -120,7 +121,6 @@ func (c *Client) SetName(name string) {
|
|||
// reports to the server.
|
||||
func (c *Client) Start() {
|
||||
c.log(logger.Debug, pkg+"Client is starting")
|
||||
c.err = make(chan error)
|
||||
c.wg.Add(2)
|
||||
go c.recv()
|
||||
go c.send()
|
||||
|
|
Loading…
Reference in New Issue