Skip to content

Commit

Permalink
Release IP fix
Browse files Browse the repository at this point in the history
Fix so that ReleaseIP() returns gracefully if IP already been released.
  • Loading branch information
yuewko committed Jul 13, 2016
1 parent a63504a commit 20b5f42
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions object_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,9 @@ func (objMgr *ObjectManager) ReleaseIP(netview string, ipAddr string, macAddr st
fixAddress, _ := objMgr.GetFixedAddress(netview, ipAddr, macAddr)
fmt.Printf("GetFixedAddress() returns: '%s'\n", fixAddress)

if fixAddress == nil {
return "", nil
}
return objMgr.connector.DeleteObject(fixAddress.Ref)
}

Expand Down

0 comments on commit 20b5f42

Please sign in to comment.