Index: remoting/host/linux/audio_pipe_reader.cc |
=================================================================== |
--- remoting/host/linux/audio_pipe_reader.cc (revision 179698) |
+++ remoting/host/linux/audio_pipe_reader.cc (working copy) |
@@ -145,10 +145,10 @@ |
while (pos < data.size()) { |
int read_result = HANDLE_EINTR( |
read(pipe_fd_, string_as_array(&data) + pos, data.size() - pos)); |
- if (read_result >= 0) { |
+ if (read_result > 0) { |
pos += read_result; |
} else { |
- if (errno != EWOULDBLOCK && errno != EAGAIN) |
+ if (read_result < 0 && errno != EWOULDBLOCK && errno != EAGAIN) |
PLOG(ERROR) << "read"; |
break; |
} |