internal/pipewire: check pending ids after done
All checks were successful
Test / Create distribution (push) Successful in 37s
Test / Sandbox (push) Successful in 2m41s
Test / Hakurei (push) Successful in 4m49s
Test / Sandbox (race detector) (push) Successful in 4m49s
Test / Hpkg (push) Successful in 5m3s
Test / Hakurei (race detector) (push) Successful in 47s
Test / Flake checks (push) Successful in 1m42s

This is not guaranteed to have completed after a roundtrip. This is leftover from when Roundtrip also sent and waited for sync.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
Ophestra 2025-12-06 21:09:55 +09:00
parent f44923da29
commit bb1fc4c7bc
Signed by: cat
SSH Key Fingerprint: SHA256:gQ67O0enBZ7UdZypgtspB2FDM1g3GVw8nX0XSdcFw8Q
2 changed files with 6 additions and 8 deletions

View File

@ -3,6 +3,8 @@ package pipewire
import (
"errors"
"fmt"
"maps"
"slices"
"strconv"
"time"
)
@ -373,6 +375,10 @@ func (core *Core) Sync() error {
}
}
if len(core.ctx.pendingIds) != 0 {
core.ctx.closeReceivedFiles()
return &ProxyFatalError{Err: UnacknowledgedProxyError(slices.Collect(maps.Keys(core.ctx.pendingIds))), ProxyErrs: core.ctx.cloneAsProxyErrors()}
}
return core.ctx.doSyncComplete()
}

View File

@ -18,7 +18,6 @@ import (
"encoding/binary"
"fmt"
"io"
"maps"
"os"
"runtime"
"slices"
@ -601,13 +600,6 @@ func (ctx *Context) roundtrip() (err error) {
err = &ProxyFatalError{Err: danglingFiles, ProxyErrs: ctx.cloneAsProxyErrors()}
return
}
// this check must happen after everything else passes
if len(ctx.pendingIds) != 0 {
ctx.closeReceivedFiles()
err = &ProxyFatalError{Err: UnacknowledgedProxyError(slices.Collect(maps.Keys(ctx.pendingIds))), ProxyErrs: ctx.cloneAsProxyErrors()}
return
}
}()
var remaining []byte