Skip to content

Commit 39695b2

Browse files
Revert "Fixes #10490. Don't return from safe_read() early on stopreads if we haven't read any bytes, this looks like an eof to higher levels of code."
I misread a report from Jim Stichnot, it was oldfile and not stopreads causing problems. This reverts commit 393295c.
1 parent 28db6ca commit 39695b2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

mythtv/libs/libmythtv/fileringbuffer.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,9 @@ int FileRingBuffer::safe_read(int fd, void *data, uint sz)
429429
return 0;
430430
}
431431

432+
if (stopreads)
433+
return 0;
434+
432435
while (tot < sz)
433436
{
434437
ret = read(fd2, (char *)data + tot, sz - tot);
@@ -467,7 +470,7 @@ int FileRingBuffer::safe_read(int fd, void *data, uint sz)
467470
break;
468471
}
469472
}
470-
if (stopreads && (tot > 0))
473+
if (stopreads)
471474
break;
472475
if (tot < sz)
473476
usleep(60000);

0 commit comments

Comments
 (0)