mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-01 22:58:50 -04:00
bluez5: don't try to acquire if we are getting errors
If transport goes into error state too often, fail instead of trying to acquire it again. This avoids getting into a tight acquire->fail->reacquire loop.
This commit is contained in:
parent
397059017b
commit
13a9964a71
3 changed files with 41 additions and 8 deletions
|
|
@ -1672,12 +1672,15 @@ static void transport_state_changed(void *data,
|
|||
* the transport, we won't get a write error, but instead see a transport
|
||||
* state change.
|
||||
*
|
||||
* Emit a node error, to let upper levels handle it.
|
||||
* Treat this as a transport error, so that upper levels don't try to
|
||||
* retry too often.
|
||||
*/
|
||||
|
||||
spa_log_debug(this->log, "%p: transport %p becomes inactive: stop and indicate error",
|
||||
this, this->transport);
|
||||
state = SPA_BT_TRANSPORT_STATE_ERROR;
|
||||
|
||||
spa_bt_transport_set_state(this->transport, SPA_BT_TRANSPORT_STATE_ERROR);
|
||||
return;
|
||||
}
|
||||
|
||||
if (state == SPA_BT_TRANSPORT_STATE_ERROR) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue