Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

caught closed chanel

  • Loading branch information...
commit 7de6875828494adb57559e2fb438f86d8f501518 1 parent 243989a
Jeffrey Hulten authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 event.go
View
6 event.go
@@ -181,7 +181,11 @@ func (eventState *eventMonitoringState) monitorEvents(c *Client) {
for eventState.isEnabled() {
timeout := time.After(100 * time.Millisecond)
select {
- case ev := <-eventState.C:
+ case ev, ok := <-eventState.C:
+ if !ok {
+ // channel has been closed, exiting
+ return
+ }
// send the event
go eventState.sendEvent(ev)
Please sign in to comment.
Something went wrong with that request. Please try again.