Skip to content

Commit

Permalink
bugfix: return the context error during event subscribe
Browse files Browse the repository at this point in the history
Signed-off-by: Wei Fu <fuweid89@gmail.com>
  • Loading branch information
fuweid committed Oct 24, 2018
1 parent a4b6522 commit 15a761c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions events.go
Expand Up @@ -110,6 +110,9 @@ func (e *eventRemote) Subscribe(ctx context.Context, filters ...string) (ch <-ch
Event: ev.Event,
}:
case <-ctx.Done():
if cerr := ctx.Err(); cerr != context.Canceled {
errq <- cerr
}
return
}
}
Expand Down

0 comments on commit 15a761c

Please sign in to comment.