2 parents f3f739b + 3643196 commit f43a9f9Copy full SHA for f43a9f9
1 file changed
imgproxy/handler.go
@@ -255,7 +255,8 @@ func startImgproxy() {
255
}
256
257
state.mu.Lock()
258
- if state.cmd == cmd {
+ current := state.cmd == cmd
259
+ if current {
260
state.cmd = nil
261
state.running = false
262
if err != nil {
@@ -264,7 +265,9 @@ func startImgproxy() {
264
265
266
state.mu.Unlock()
267
- if err != nil && global.Settings.Imgproxy.Enabled {
268
+ // only react to the exit of the process we are actually tracking;
269
+ // a stale goroutine from a previous instance must not disable a new one
270
+ if current && err != nil && global.Settings.Imgproxy.Enabled {
271
disableImgproxyWithError(err)
272
273
}(cmd)
0 commit comments