mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
pulse-server: add missing EWOULDBLOCK check
This commit is contained in:
parent
ebed44db79
commit
87c00a6f00
1 changed files with 7 additions and 6 deletions
|
|
@ -244,11 +244,12 @@ static int flush_messages(struct client *client)
|
||||||
while (true) {
|
while (true) {
|
||||||
res = send(client->source->fd, data, size, MSG_NOSIGNAL | MSG_DONTWAIT);
|
res = send(client->source->fd, data, size, MSG_NOSIGNAL | MSG_DONTWAIT);
|
||||||
if (res < 0) {
|
if (res < 0) {
|
||||||
if (errno == EINTR)
|
res = -errno;
|
||||||
|
if (res == -EINTR)
|
||||||
continue;
|
continue;
|
||||||
if (errno != EAGAIN && errno != EWOULDBLOCK)
|
if (res != -EAGAIN && res != -EWOULDBLOCK)
|
||||||
pw_log_warn("send channel:%d %zu, res %d: %m", m->channel, size, res);
|
pw_log_warn("send channel:%d %zu, error %d: %m", m->channel, size, res);
|
||||||
return -errno;
|
return res;
|
||||||
}
|
}
|
||||||
client->out_index += res;
|
client->out_index += res;
|
||||||
break;
|
break;
|
||||||
|
|
@ -5609,7 +5610,7 @@ on_client_data(void *data, int fd, uint32_t mask)
|
||||||
while (true) {
|
while (true) {
|
||||||
res = do_read(client);
|
res = do_read(client);
|
||||||
if (res < 0) {
|
if (res < 0) {
|
||||||
if (res != -EAGAIN)
|
if (res != -EAGAIN && res != EWOULDBLOCK)
|
||||||
goto error;
|
goto error;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -5623,7 +5624,7 @@ on_client_data(void *data, int fd, uint32_t mask)
|
||||||
int mask = client->source->mask;
|
int mask = client->source->mask;
|
||||||
SPA_FLAG_CLEAR(mask, SPA_IO_OUT);
|
SPA_FLAG_CLEAR(mask, SPA_IO_OUT);
|
||||||
pw_loop_update_io(impl->loop, client->source, mask);
|
pw_loop_update_io(impl->loop, client->source, mask);
|
||||||
} else if (res != -EAGAIN)
|
} else if (res != -EAGAIN && res != -EWOULDBLOCK)
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue