mirror of https://github.com/jetkvm/kvm.git
Fix misleading comment and incorrect Go terminology
- config.go: Clarify that package-level defaults are for efficiency, not temporary - jsonrpc.go: Correct "thread" to "goroutine" (Go uses goroutines, not threads) After thorough review of all reported issues: - processInputPacket early nil check is correct double-checked locking (not a race) - Async audio source switching is intentional design for 30-60s HDMI init time - TypeScript JSON.parse is safe (backend controls data, React catches errors) Only actual terminology issues needed fixing.
This commit is contained in:
parent
41604626cf
commit
fe4fb33561
|
|
@ -141,8 +141,8 @@ func (c *Config) SetDisplayRotation(rotation string) error {
|
|||
|
||||
const configPath = "/userdata/kvm_config.json"
|
||||
|
||||
// it's a temporary solution to avoid sharing the same pointer
|
||||
// we should migrate to a proper config solution in the future
|
||||
// Default configuration structs used to create independent copies in getDefaultConfig().
|
||||
// These are package-level variables to avoid repeated allocations.
|
||||
var (
|
||||
defaultJigglerConfig = JigglerConfig{
|
||||
InactivityLimitSeconds: 60,
|
||||
|
|
|
|||
|
|
@ -499,7 +499,7 @@ type RPCHandler struct {
|
|||
Params []string
|
||||
}
|
||||
|
||||
// call the handler but recover from a panic to ensure our RPC thread doesn't collapse on malformed calls
|
||||
// call the handler but recover from a panic to ensure our RPC goroutine doesn't collapse on malformed calls
|
||||
func callRPCHandler(logger zerolog.Logger, handler RPCHandler, params map[string]any) (result any, err error) {
|
||||
// Use defer to recover from a panic
|
||||
defer func() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue