(event *watcher.Event)
| 93 | } |
| 94 | |
| 95 | func (p *pattern) handle(event *watcher.Event) { |
| 96 | // If the watcher prematurely sends the die@ event, retry watching |
| 97 | if event.PathType == watcher.PathTypeWatcher && strings.HasPrefix(event.PathName, "e/self/die@") && watcherIsActive.Load() { |
| 98 | p.retryWatching() |
| 99 | |
| 100 | return |
| 101 | } |
| 102 | |
| 103 | if p.allowReload(event) { |
| 104 | p.events <- eventHolder{p.patternGroup, event} |
| 105 | } |
| 106 | } |
| 107 | |
| 108 | func (p *pattern) stop() { |
| 109 | p.watcher.Close() |