Commit 291ee9f8 authored by Max Kellermann's avatar Max Kellermann

output/fifo: simplify the Cancel() loop

parent 59e4d7f0
......@@ -227,12 +227,13 @@ inline void
FifoOutput::Cancel()
{
char buf[FIFO_BUFFER_SIZE];
int bytes = 1;
int bytes;
timer->Reset();
while (bytes > 0 && errno != EINTR)
do {
bytes = read(input, buf, FIFO_BUFFER_SIZE);
} while (bytes > 0 && errno != EINTR);
if (bytes < 0 && errno != EAGAIN) {
FormatErrno(fifo_output_domain,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment