mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
bluez5: avoid poll busy loop in a2dp-sink
Disable flush polling when we don't have data ready to write to the socket (or socket send failed). This avoids entering into a poll busy loop, which may result to rtkit killing the process.
This commit is contained in:
parent
5071589aea
commit
672223d055
1 changed files with 6 additions and 0 deletions
|
|
@ -647,6 +647,7 @@ again:
|
|||
spa_log_trace(this->log, NAME" %p: error flushing %s", this,
|
||||
spa_strerror(written));
|
||||
reset_buffer(this);
|
||||
enable_flush(this, false);
|
||||
return written;
|
||||
}
|
||||
else if (written > 0) {
|
||||
|
|
@ -660,6 +661,11 @@ again:
|
|||
|
||||
enable_flush(this, false);
|
||||
}
|
||||
else {
|
||||
/* Don't want to flush yet, or failed to write anything */
|
||||
spa_log_trace(this->log, NAME" %p: skip flush", this);
|
||||
enable_flush(this, false);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue