diff options
Diffstat (limited to 'modules/graceful/restart_unix.go')
-rw-r--r-- | modules/graceful/restart_unix.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/graceful/restart_unix.go b/modules/graceful/restart_unix.go index 392ed60cb3..9969e007c3 100644 --- a/modules/graceful/restart_unix.go +++ b/modules/graceful/restart_unix.go @@ -55,7 +55,9 @@ func RestartProcess() (int, error) { unixListener.SetUnlinkOnClose(false) } // Remember to close these at the end. - defer files[i].Close() + defer func(i int) { + _ = files[i].Close() + }(i) } // Use the original binary location. This works with symlinks such that if |