forked from security/hakurei
internal/pipewire: rename context consume method
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:
@@ -536,7 +536,7 @@ func (ctx *Context) Roundtrip() (err error) {
|
|||||||
|
|
||||||
var remaining []byte
|
var remaining []byte
|
||||||
for {
|
for {
|
||||||
remaining, err = ctx.roundtrip(remaining)
|
remaining, err = ctx.consume(remaining)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
@@ -554,8 +554,8 @@ func (ctx *Context) Roundtrip() (err error) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// roundtrip receives messages from the server and processes events.
|
// consume receives messages from the server and processes events.
|
||||||
func (ctx *Context) roundtrip(receiveRemaining []byte) (remaining []byte, err error) {
|
func (ctx *Context) consume(receiveRemaining []byte) (remaining []byte, err error) {
|
||||||
var (
|
var (
|
||||||
// this holds onto non-protocol errors encountered during event handling;
|
// this holds onto non-protocol errors encountered during event handling;
|
||||||
// errors that prevent event processing from continuing must be panicked
|
// errors that prevent event processing from continuing must be panicked
|
||||||
|
|||||||
Reference in New Issue
Block a user