mirror of https://bitbucket.org/ausocean/av.git
revid: changed close operation on destination to close operpation on slice ofoperations in reset()
This commit is contained in:
parent
219cafc032
commit
a4ded5337d
|
@ -118,7 +118,7 @@ type Revid struct {
|
|||
// to the target destination.
|
||||
buffer *ring.Buffer
|
||||
// destination is the target endpoint.
|
||||
destination loadSender
|
||||
destination []loadSender
|
||||
|
||||
// bitrate hold the last send bitrate calculation result.
|
||||
bitrate int
|
||||
|
@ -200,12 +200,15 @@ func (r *Revid) reset(config Config) error {
|
|||
}
|
||||
r.config = config
|
||||
|
||||
if r.destination != nil {
|
||||
err = r.destination.close()
|
||||
if err != nil {
|
||||
r.config.Logger.Log(smartlogger.Error, pkg+"could not close destination", "error", err.Error())
|
||||
for i, destination := range r.destination {
|
||||
if destination != nil {
|
||||
err = destination.close()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
switch r.config.Output {
|
||||
case File:
|
||||
s, err := newFileSender(config.OutputFileName)
|
||||
|
|
Loading…
Reference in New Issue