Skip to content

Commit

Permalink
Merge "[FAB-3694] Fix error handling in peer channel cmd"
Browse files Browse the repository at this point in the history
  • Loading branch information
christo4ferris authored and Gerrit Code Review committed May 7, 2017
2 parents 3162771 + 2d96232 commit c346b06
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 0 additions & 4 deletions peer/channel/channel.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,6 @@ func InitCmdFactory(isOrdererRequired bool) (*ChannelCmdFactory, error) {
return common.GetBroadcastClient(orderingEndpoint, tls, caFile)
}

if err != nil {
return nil, fmt.Errorf("Error getting broadcast client: %s", err)
}

//for join, we need the endorser as well
if isOrdererRequired {
cmdFact.EndorserClient, err = common.GetEndorserClient()
Expand Down
2 changes: 1 addition & 1 deletion peer/channel/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ func sendCreateChainTransaction(cf *ChannelCmdFactory) error {
var broadcastClient common.BroadcastClient
broadcastClient, err = cf.BroadcastFactory()
if err != nil {
return err
return fmt.Errorf("Error getting broadcast client: %s", err)
}

defer broadcastClient.Close()
Expand Down

0 comments on commit c346b06

Please sign in to comment.