From 7cb3308a53f55bd41c6524c9e5e37667fa3b343e Mon Sep 17 00:00:00 2001 From: Ophestra Date: Sat, 6 Dec 2025 19:13:46 +0900 Subject: 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 --- internal/pipewire/core.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'internal/pipewire/core.go') 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. -- cgit v1.3.1