aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/pipewire/core.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-12-06 19:13:46 +0900
committerOphestra <cat@gensokyo.uk>2025-12-06 19:13:46 +0900
commit7cb3308a53f55bd41c6524c9e5e37667fa3b343e (patch)
tree86765957e5ce8c329beaf07da20f916f0575c304 /internal/pipewire/core.go
parent490093a659f305f7d7378e152604b8d021a69bd3 (diff)
internal/pipewire: store proxy errors in context
This change fixes handling of non-fatal errors during a roundtrip as there can be multiple receive calls per roundtrip. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/pipewire/core.go')
-rw-r--r--internal/pipewire/core.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/pipewire/core.go b/internal/pipewire/core.go
index c2913b29..3b67a50d 100644
--- a/internal/pipewire/core.go
+++ b/internal/pipewire/core.go
@@ -361,18 +361,18 @@ func (core *Core) Sync() error {
if err := core.ctx.coreSync(roundtripSyncID); err != nil {
return err
}
-
deadline := time.Now().Add(syncTimeout)
+
for !core.done {
if time.Now().After(deadline) {
return ErrNotDone
}
- if err := core.ctx.Roundtrip(); err != nil {
+ if err := core.ctx.roundtrip(); err != nil {
return err
}
}
- return nil
+ return core.ctx.cloneProxyErrors()
}
// The CorePong message is sent from the client to the server when the server emits the Ping event.