Skip to content

Commit

Permalink
Detect empty reads
Browse files Browse the repository at this point in the history
  • Loading branch information
maddyblue committed Apr 16, 2015
1 parent 5fbd282 commit 6723622
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/seek.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func (s *Seek) Read(n int) (b []float32, err error) {
for len(s.b)-s.pos < n {
b, err = s.f(n)
s.b = append(s.b, b...)
if err != nil {
if err != nil || len(b) == 0 {
break
}
}
Expand Down

0 comments on commit 6723622

Please sign in to comment.