internal/pipewire: rename context consume method
All checks were successful
Test / Create distribution (push) Successful in 35s
Test / Sandbox (push) Successful in 2m45s
Test / Sandbox (race detector) (push) Successful in 4m43s
Test / Hakurei (push) Successful in 5m3s
Test / Hpkg (push) Successful in 5m7s
Test / Hakurei (race detector) (push) Successful in 46s
Test / Flake checks (push) Successful in 1m37s

This name is more correct since it does not roundtrip, but receives messages. This is also more consistent with the method on event proxies.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
Ophestra 2025-12-06 16:44:39 +09:00
parent 8a2f9edcf9
commit 2b22efcdf1
Signed by: cat
SSH Key Fingerprint: SHA256:gQ67O0enBZ7UdZypgtspB2FDM1g3GVw8nX0XSdcFw8Q

View File

@ -536,7 +536,7 @@ func (ctx *Context) Roundtrip() (err error) {
var remaining []byte
for {
remaining, err = ctx.roundtrip(remaining)
remaining, err = ctx.consume(remaining)
if err == nil {
continue
}
@ -554,8 +554,8 @@ func (ctx *Context) Roundtrip() (err error) {
}
}
// roundtrip receives messages from the server and processes events.
func (ctx *Context) roundtrip(receiveRemaining []byte) (remaining []byte, err error) {
// consume receives messages from the server and processes events.
func (ctx *Context) consume(receiveRemaining []byte) (remaining []byte, err error) {
var (
// this holds onto non-protocol errors encountered during event handling;
// errors that prevent event processing from continuing must be panicked