Skip to content

Commit

Permalink
Global EventNotWatching events for session lost
Browse files Browse the repository at this point in the history
  • Loading branch information
dragonsinth authored and yarikk committed Nov 6, 2020
1 parent 50daf81 commit 54f4812
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -534,6 +534,7 @@ func (c *Conn) invalidateWatches(err error) {
if len(c.watchers) >= 0 {
for pathType, watchers := range c.watchers {
ev := Event{Type: EventNotWatching, State: StateDisconnected, Path: pathType.path, Err: err}
c.sendEvent(ev) // also publish globally
for _, ch := range watchers {
ch <- ev
close(ch)
Expand Down

0 comments on commit 54f4812

Please sign in to comment.