fixed unhandled panic and wrapped all internal goroutines

This commit is contained in:
Gani Georgiev
2026-07-15 12:03:07 +03:00
parent 09044ef7a3
commit f1618ee59b
13 changed files with 85 additions and 37 deletions
+3 -2
View File
@@ -33,6 +33,7 @@ import (
"github.com/fsnotify/fsnotify"
"github.com/pocketbase/pocketbase/core"
"github.com/pocketbase/pocketbase/plugins/jsvm/internal/types/generated"
"github.com/pocketbase/pocketbase/tools/routine"
"github.com/pocketbase/pocketbase/tools/template"
)
@@ -407,7 +408,7 @@ func (p *plugin) watchHooks() error {
})
// start listening for events.
go func() {
routine.FireAndForget(func() {
defer stopDebounceTimer()
for {
@@ -437,7 +438,7 @@ func (p *plugin) watchHooks() error {
color.Red("Watch error:", err)
}
}
}()
})
// add directories to watch
//