internal/pipewire: treat unknown opcode as fatal
All checks were successful
Test / Create distribution (push) Successful in 58s
Test / Hakurei (push) Successful in 8m27s
Test / Hakurei (race detector) (push) Successful in 10m24s
Test / Sandbox (push) Successful in 1m43s
Test / Sandbox (race detector) (push) Successful in 2m13s
Test / Hpkg (push) Successful in 3m21s
Test / Flake checks (push) Successful in 1m30s
All checks were successful
Test / Create distribution (push) Successful in 58s
Test / Hakurei (push) Successful in 8m27s
Test / Hakurei (race detector) (push) Successful in 10m24s
Test / Sandbox (push) Successful in 1m43s
Test / Sandbox (race detector) (push) Successful in 2m13s
Test / Hpkg (push) Successful in 3m21s
Test / Flake checks (push) Successful in 1m30s
Skipping events can cause local state to diverge from the server. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -113,7 +113,7 @@ func (client *Client) consume(opcode byte, files []int, unmarshal func(v any)) e
|
||||
return nil
|
||||
|
||||
default:
|
||||
return &UnsupportedOpcodeError{opcode, client.String()}
|
||||
panic(&UnsupportedOpcodeError{opcode, client.String()})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -764,7 +764,7 @@ func (core *Core) consume(opcode byte, files []int, unmarshal func(v any)) error
|
||||
return proxy.setBoundProps(&boundProps)
|
||||
|
||||
default:
|
||||
return &UnsupportedOpcodeError{opcode, core.String()}
|
||||
panic(&UnsupportedOpcodeError{opcode, core.String()})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -831,7 +831,7 @@ func (registry *Registry) consume(opcode byte, files []int, unmarshal func(v any
|
||||
return nil
|
||||
|
||||
default:
|
||||
return &UnsupportedOpcodeError{opcode, registry.String()}
|
||||
panic(&UnsupportedOpcodeError{opcode, registry.String()})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -190,7 +190,7 @@ func (securityContext *SecurityContext) consume(opcode byte, files []int, _ func
|
||||
// SecurityContext does not receive any events
|
||||
|
||||
default:
|
||||
return &UnsupportedOpcodeError{opcode, securityContext.String()}
|
||||
panic(&UnsupportedOpcodeError{opcode, securityContext.String()})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user