fix: loop in shutdown code rewritten to work properly (#1695)

* FIX: loop in shutdown code rewritten to work properly

Signed-off-by: invario <67800603+invario@users.noreply.github.com>

* remove unneeded wait()

we already wait in shutdown.go#L52

* cleanup

---------

Signed-off-by: invario <67800603+invario@users.noreply.github.com>
Co-authored-by: Maxi Quoß <maxi@quoss.org>
This commit is contained in:
invario
2026-03-19 07:10:45 -04:00
committed by GitHub
parent 1d361e3f8b
commit 48a8c736b2
4 changed files with 30 additions and 19 deletions

View File

@@ -151,7 +151,7 @@ func HandlerShutdown(e *core.RequestEvent) error {
if err := asyncCall(e, func() *router.ApiError {
if err := networking.ShutdownDevice(record); err != nil {
logger.Error.Println(err)
logger.Error.Println(strings.ReplaceAll(err.Error(), "\n", ""))
record.Set("status", "online")
if err := e.App.Save(record); err != nil {
logger.Error.Println("Failed to save record:", err)