Skip to content

Commit

Permalink
Merge "FAB-302: fix panic for block-listener"
Browse files Browse the repository at this point in the history
  • Loading branch information
Srinivasan Muralidharan authored and Gerrit Code Review committed Sep 12, 2016
2 parents b3a1699 + 073ce43 commit 03c8bad
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions examples/events/block-listener/block-listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,17 @@ func (a *adapter) Recv(msg *pb.Event) (bool, error) {
a.notfy <- o
return true, nil
}
if o, e := msg.Event.(*pb.Event_Rejection); e && a.listenToRejections {
a.rejected <- o
if o, e := msg.Event.(*pb.Event_Rejection); e {
if a.listenToRejections {
a.rejected <- o
}
return true, nil
}
if o, e := msg.Event.(*pb.Event_ChaincodeEvent); e {
a.cEvent <- o
return true, nil
}
a.notfy <- nil
return false, nil
return false, fmt.Errorf("Receive unkown type event: %v", msg)
}

//Disconnected implements consumer.EventAdapter interface for disconnecting
Expand Down

0 comments on commit 03c8bad

Please sign in to comment.