From 3fd4f412b17be128f00e6031d067436d3395909a Mon Sep 17 00:00:00 2001 From: xing Date: Mon, 23 Oct 2023 22:38:52 +0800 Subject: [PATCH] improve --- app/cmd/reload/reload.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/cmd/reload/reload.go b/app/cmd/reload/reload.go index 40ad7c6..f1c2842 100644 --- a/app/cmd/reload/reload.go +++ b/app/cmd/reload/reload.go @@ -255,12 +255,15 @@ func Push(fn func(), a ...any) { } func Reload() { + anyMap.Flush() + safetyMaps.Flush() + callsM.Flush() + flushMapFn.Flush() slice.Sort(calls, func(i, j queue) bool { return i.order > j.order }) for _, call := range calls { call.fn() } - anyMap.Flush() - safetyMaps.Flush() + return }