mirror of https://bitbucket.org/ausocean/av.git
revid: checking that we have more than 0 destinations before we write to the ring buffer
This commit is contained in:
parent
7619f5b921
commit
5dd3045db2
|
@ -142,6 +142,10 @@ func (p *packer) Write(frame []byte) (int, error) {
|
|||
return len(frame), nil
|
||||
}
|
||||
|
||||
if len(p.owner.destination) == 0 {
|
||||
panic("must have at least 1 destination")
|
||||
}
|
||||
|
||||
n, err := p.owner.buffer.Write(frame)
|
||||
if err != nil {
|
||||
if err == ring.ErrDropped {
|
||||
|
|
Loading…
Reference in New Issue