Skip to content

Commit

Permalink
Fix gosimple
Browse files Browse the repository at this point in the history
Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
  • Loading branch information
Flavio Crisciani committed Jan 3, 2019
1 parent 2bea082 commit d9f916e
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions default_gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,12 +181,10 @@ func (c *controller) defaultGwNetwork() (Network, error) {
defer func() { <-procGwNetwork }()

n, err := c.NetworkByName(libnGWNetwork)
if err != nil {
if _, ok := err.(types.NotFoundError); ok {
n, err = c.createGWNetwork()
}
if _, ok := err.(types.NotFoundError); ok {
n, err = c.createGWNetwork()
}
return n, err
return n, nil
}

// Returns the endpoint which is providing external connectivity to the sandbox
Expand Down

0 comments on commit d9f916e

Please sign in to comment.