diff --git a/revid/revid.go b/revid/revid.go index fde3efb7..f555e655 100644 --- a/revid/revid.go +++ b/revid/revid.go @@ -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)