internal/pipewire: work around remote sequence quirk
All checks were successful
Test / Create distribution (push) Successful in 35s
Test / Sandbox (push) Successful in 2m39s
Test / Sandbox (race detector) (push) Successful in 4m41s
Test / Hakurei (push) Successful in 4m57s
Test / Hpkg (push) Successful in 4m58s
Test / Hakurei (race detector) (push) Successful in 6m17s
Test / Flake checks (push) Successful in 1m26s
All checks were successful
Test / Create distribution (push) Successful in 35s
Test / Sandbox (push) Successful in 2m39s
Test / Sandbox (race detector) (push) Successful in 4m41s
Test / Hakurei (push) Successful in 4m57s
Test / Hpkg (push) Successful in 4m58s
Test / Hakurei (race detector) (push) Successful in 6m17s
Test / Flake checks (push) Successful in 1m26s
Remote sequence sometimes start with a non-zero value, and keeps the same value for a while before going back to zero. Conditions for reproducing this behaviour is not yet known. This change works around this behaviour. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
parent
87781c7658
commit
564db6863b
@ -674,6 +674,12 @@ func (ctx *Context) consume(receiveRemaining []byte) (remaining []byte, err erro
|
||||
if err = header.UnmarshalBinary(remaining[:SizeHeader]); err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
// remote sequence sometimes do not start with 0
|
||||
if ctx.remoteSequence == 0 {
|
||||
ctx.remoteSequence = header.Sequence
|
||||
}
|
||||
|
||||
if header.Sequence != ctx.remoteSequence {
|
||||
return remaining, UnexpectedSequenceError(header.Sequence)
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user