Skip to content

Commit

Permalink
add duration calculation error logging
Browse files Browse the repository at this point in the history
  • Loading branch information
paskal authored and umputun committed Apr 20, 2022
1 parent 0bdc5eb commit a5ec308
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/duration/duration.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ func (s *Service) Reader(r io.Reader) int {

for err == nil {
if err = d.Decode(&f, &skipped); err != nil && err != io.EOF {
log.Printf("[WARN] can't get duration for provided stream: %v", err)
return 0
}
duration += f.Duration().Seconds()
Expand Down

0 comments on commit a5ec308

Please sign in to comment.