Skip to content

Commit

Permalink
[FAB-3207] fix JoinChan fails at event publish failing
Browse files Browse the repository at this point in the history
If the event publishing fails, the join channel also fails.
This shouldn't be so, because an event publishing might fail because
a subscriber is reading too slow from the stream.

Change-Id: I82202d478a12b555f6c7f63a52580c607ca3b15d
Signed-off-by: Yacov Manevich <yacovm@il.ibm.com>
  • Loading branch information
yacovm committed Apr 18, 2017
1 parent 7f336b9 commit bc28d27
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/scc/cscc/configure.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,7 @@ func joinChain(blockBytes []byte) pb.Response {
peer.InitChain(chainID)

if err := producer.SendProducerBlockEvent(block); err != nil {
msg := fmt.Sprintf("Error sending block event %s", err)
return shim.Error(msg)
cnflogger.Errorf("Error sending block event %s", err)
}

return shim.Success(nil)
Expand All @@ -143,6 +142,7 @@ func updateConfigBlock(blockBytes []byte) pb.Response {
}

if err := peer.SetCurrConfigBlock(block, chainID); err != nil {

return shim.Error(err.Error())
}

Expand Down

0 comments on commit bc28d27

Please sign in to comment.