internal/pipewire: sendmsg/recvmsg errors are fatal
All checks were successful
Test / Create distribution (push) Successful in 40s
Test / Sandbox (push) Successful in 2m35s
Test / Hakurei (push) Successful in 3m31s
Test / Hpkg (push) Successful in 4m20s
Test / Sandbox (race detector) (push) Successful in 4m42s
Test / Hakurei (race detector) (push) Successful in 5m28s
Test / Flake checks (push) Successful in 1m35s
All checks were successful
Test / Create distribution (push) Successful in 40s
Test / Sandbox (push) Successful in 2m35s
Test / Hakurei (push) Successful in 3m31s
Test / Hpkg (push) Successful in 4m20s
Test / Sandbox (race detector) (push) Successful in 4m42s
Test / Hakurei (race detector) (push) Successful in 5m28s
Test / Flake checks (push) Successful in 1m35s
When returned wrapped as a syscall error, these are impossible to recover from, so wrap them as a fatal error. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -310,7 +310,7 @@ func (ctx *Context) recvmsg(remaining []byte) (payload []byte, err error) {
|
|||||||
}
|
}
|
||||||
if err != syscall.EAGAIN && err != syscall.EWOULDBLOCK {
|
if err != syscall.EAGAIN && err != syscall.EWOULDBLOCK {
|
||||||
ctx.closeReceivedFiles()
|
ctx.closeReceivedFiles()
|
||||||
return nil, os.NewSyscallError("recvmsg", err)
|
return nil, &ProxyFatalError{Err: os.NewSyscallError("recvmsg", err), ProxyErrs: ctx.cloneAsProxyErrors()}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -347,7 +347,7 @@ func (ctx *Context) sendmsg(p []byte, fds ...int) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if err != nil && err != syscall.EAGAIN && err != syscall.EWOULDBLOCK {
|
if err != nil && err != syscall.EAGAIN && err != syscall.EWOULDBLOCK {
|
||||||
return os.NewSyscallError("sendmsg", err)
|
return &ProxyFatalError{Err: os.NewSyscallError("sendmsg", err), ProxyErrs: ctx.cloneAsProxyErrors()}
|
||||||
}
|
}
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user