restore compatibility with non-raspberry arm systems (#1587)

This commit is contained in:
Alessandro Ros
2023-03-20 23:01:47 +01:00
committed by GitHub
parent 7e684f157d
commit 7a4928643d
5 changed files with 91 additions and 90 deletions

View File

@@ -181,8 +181,6 @@ outer:
p.ctxCancel()
p.closeResources(nil, false)
rpicamera.LibcameraCleanup()
}
func (p *Core) createResources(initial bool) error {
@@ -210,11 +208,6 @@ func (p *Core) createResources(initial bool) error {
// do not check for errors
rlimit.Raise()
err := rpicamera.LibcameraSetup()
if err != nil {
return err
}
gin.SetMode(gin.ReleaseMode)
p.externalCmdPool = externalcmd.NewPool()
@@ -679,6 +672,10 @@ func (p *Core) closeResources(newConf *conf.Conf, calledByAPI bool) {
p.externalCmdPool.Close()
}
if newConf == nil {
rpicamera.Cleanup()
}
if closeLogger {
p.logger.Close()
p.logger = nil