fix(upgrader): add delay before graceful restart to ensure file write completion nginx ui #911

This commit is contained in:
Jacky 2025-05-04 04:56:56 +00:00
parent be59730756
commit faaaa247e6
No known key found for this signature in database
GPG key ID: 215C21B10DF38B4D

View file

@ -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