Skip to content

Commit

Permalink
Merge pull request #1099 from cockroachdb/pmattis/localcluster-monitor
Browse files Browse the repository at this point in the history
Fix processing of monitoring events.
  • Loading branch information
petermattis committed May 21, 2015
2 parents bcecfb6 + 23802e9 commit c7ec260
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions acceptance/localcluster/localcluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -335,14 +335,15 @@ func (l *Cluster) processEvent(e dockerclient.EventOrError) bool {
default:
// There is a very tiny race here: the signal handler might be closing the
// stopper simultaneously.
log.Errorf("stopping due to unexpected event: %+v", e)
close(l.stopper)
}
return false
}

func (l *Cluster) monitor(ch <-chan dockerclient.EventOrError) {
for {
if !l.processEvent(<-ch) {
for e := range ch {
if !l.processEvent(e) {
break
}
}
Expand Down

0 comments on commit c7ec260

Please sign in to comment.