mirror of https://bitbucket.org/ausocean/av.git
Log n with ring buffer errors (in addition to size).
This commit is contained in:
parent
980e48c22c
commit
db02c8daa2
|
@ -247,12 +247,12 @@ func (s *mtsSender) Write(d []byte) (int, error) {
|
|||
s.curPid = int(p)
|
||||
if time.Now().Sub(s.prev) >= s.clipDur && s.curPid == mts.PatPid && len(s.buf) > 0 {
|
||||
s.prev = time.Now()
|
||||
_, err := s.ring.Write(s.buf)
|
||||
n, err := s.ring.Write(s.buf)
|
||||
if err == nil {
|
||||
s.ring.Flush()
|
||||
}
|
||||
if err != nil {
|
||||
s.log(logger.Warning, pkg+"mtsSender: ringBuffer write error", "error", err.Error(), "size", len(s.buf))
|
||||
s.log(logger.Warning, pkg+"mtsSender: ringBuffer write error", "error", err.Error(), "n", n, "size", len(s.buf))
|
||||
}
|
||||
s.buf = s.buf[:0]
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue