internal/pipewire: do not send ancillary msg without files

This is unnecessary and does not match upstream behaviour.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2025-12-05 04:20:04 +09:00
parent d5509cc6e5
commit 0d3f332d45

View File

@@ -494,7 +494,11 @@ func (ctx *Context) Roundtrip() (err error) {
if err = ctx.conn.SetDeadline(time.Now().Add(connTimeout)); err != nil { if err = ctx.conn.SetDeadline(time.Now().Add(connTimeout)); err != nil {
return return
} }
if _, _, err = ctx.conn.WriteMsgUnix(ctx.buf, syscall.UnixRights(ctx.pendingFiles...), nil); err != nil { var unixRightsOob []byte
if len(ctx.pendingFiles) > 0 {
unixRightsOob = syscall.UnixRights(ctx.pendingFiles...)
}
if _, _, err = ctx.conn.WriteMsgUnix(ctx.buf, unixRightsOob, nil); err != nil {
return return
} }