mirror of https://bitbucket.org/ausocean/av.git
alsa: return n where applicable in alsa.Read
This commit is contained in:
parent
1abca8cd7e
commit
23e4607cc5
|
@ -436,10 +436,10 @@ func (d *ALSA) Read(p []byte) (int, error) {
|
|||
switch err {
|
||||
case nil, io.EOF:
|
||||
d.l.Log(logger.Debug, pkg+"EOF")
|
||||
return 0, nil
|
||||
return n, nil
|
||||
default:
|
||||
d.l.Log(logger.Error, pkg+"unexpected error from Read", "error", err.Error())
|
||||
return 0, nil
|
||||
return n, nil
|
||||
}
|
||||
}
|
||||
d.l.Log(logger.Debug, fmt.Sprintf("%v read %v bytes", pkg, n))
|
||||
|
|
Loading…
Reference in New Issue