mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-01 22:58:47 -04:00
don't fail if a signalled writability of STDOUT is no longer true when we try it because some other thread already wrote something
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2251 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
413656bce6
commit
c9db6d2543
1 changed files with 7 additions and 0 deletions
|
|
@ -299,6 +299,10 @@ static int do_read(pa_ioline *l) {
|
|||
|
||||
/* Read some data */
|
||||
if ((r = pa_iochannel_read(l->io, l->rbuf+l->rbuf_index+l->rbuf_valid_length, len)) <= 0) {
|
||||
|
||||
if (r < 0 && errno == EAGAIN)
|
||||
return 0;
|
||||
|
||||
if (r < 0 && errno != ECONNRESET) {
|
||||
pa_log("read(): %s", pa_cstrerror(errno));
|
||||
failure(l, 0);
|
||||
|
|
@ -328,6 +332,9 @@ static int do_write(pa_ioline *l) {
|
|||
|
||||
if ((r = pa_iochannel_write(l->io, l->wbuf+l->wbuf_index, l->wbuf_valid_length)) <= 0) {
|
||||
|
||||
if (r < 0 && errno == EAGAIN)
|
||||
return 0;
|
||||
|
||||
if (r < 0 && errno != EPIPE)
|
||||
pa_log("write(): %s", pa_cstrerror(errno));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue