Browse Source

Register termination of watchers on application shutdown.

master
Benjamin Shelton 2 weeks ago
parent
commit
5b5ef236ff
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      extension/watcher.go

+ 4
- 1
extension/watcher.go View File

@ -58,7 +58,10 @@ func (w *watcher) Requires() []string {
}
func (w *watcher) Init(app capstan.Application) {
// Auto-register termination of watchers on application shutdown.
app.RegisterShutdownHook(func() error {
return w.Close()
})
}
// ExtensionDeinitializer interface.


Loading…
Cancel
Save