mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-10 18:05:48 +02:00
fix(upgrader): add delay before graceful restart to ensure file write completion nginx ui #911
This commit is contained in:
parent
be59730756
commit
faaaa247e6
1 changed files with 4 additions and 0 deletions
|
@ -11,6 +11,7 @@ import (
|
|||
"strconv"
|
||||
"strings"
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
"code.pfad.fr/risefront"
|
||||
_github "github.com/0xJacky/Nginx-UI/.github"
|
||||
|
@ -273,6 +274,9 @@ func (u *Upgrader) PerformCoreUpgrade(tarPath string) (err error) {
|
|||
return err
|
||||
}
|
||||
|
||||
// wait for the file to be written
|
||||
time.Sleep(1 * time.Second)
|
||||
|
||||
// gracefully restart
|
||||
risefront.Restart()
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue