Skip to content

Commit

Permalink
[FAB-5343]NewChannel set nil in the channels array
Browse files Browse the repository at this point in the history
Change-Id: Ifbfec9f9a9230db356027511317c9439c004dabd
Signed-off-by: Firas Qutishat <firas.qutishat@securekey.com>
  • Loading branch information
fqutishat committed Jul 17, 2017
1 parent 3da99de commit 1765d77
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/fabric-client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,11 @@ func (c *Client) NewChannel(name string) (fab.Channel, error) {
return nil, fmt.Errorf("Channel %s already exists", name)
}
var err error
c.channels[name], err = channel.NewChannel(name, c)
channel, err := channel.NewChannel(name, c)
if err != nil {
return nil, err
}
c.channels[name] = channel
return c.channels[name], nil
}

Expand Down

0 comments on commit 1765d77

Please sign in to comment.