mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-02-21 02:01:35 +00:00
Always unlock the lockfile when killing the app.
Otherwise, we have a deadlock whenever the lock is forced: the app will be restarted, and will find the lockfile is already there so it won't be able to lock/unlock it. The supervisor will have the same problem. So the solution is that, whenever we kill the app, that is the lock owner, we also unlock the file.
This commit is contained in:
parent
752c43f628
commit
6e62366541
@ -110,6 +110,8 @@ exports.kill = kill = (app) ->
|
||||
if statusCode is '404'
|
||||
return
|
||||
throw err
|
||||
.tap ->
|
||||
lockFile.unlockAsync(lockPath(app))
|
||||
.tap ->
|
||||
logSystemEvent(logTypes.stopAppSuccess, app)
|
||||
app.containerId = null
|
||||
|
Loading…
x
Reference in New Issue
Block a user