fixed unhandled panic and wrapped all internal goroutines
This commit is contained in:
@@ -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
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user