Merge pull request #1219 from squaremo/driveby
Remove misleading comment and lowercase deniedBy
This commit is contained in:
commit
77358140d9
2 files changed
+4
-4
No files matched your search
+1
-1
@@ -167,7 +167,7 @@ func (alloc *Allocator) spaceRequestDenied(sender router.PeerName, r address.Ran
|
|||||||
for i := 0; i < len(alloc.pendingClaims); {
|
for i := 0; i < len(alloc.pendingClaims); {
|
||||||
claim := alloc.pendingClaims[i].(*claim)
|
claim := alloc.pendingClaims[i].(*claim)
|
||||||
if r.Contains(claim.addr) {
|
if r.Contains(claim.addr) {
|
||||||
claim.DeniedBy(alloc, sender)
|
claim.deniedBy(alloc, sender)
|
||||||
alloc.pendingClaims = append(alloc.pendingClaims[:i], alloc.pendingClaims[i+1:]...)
|
alloc.pendingClaims = append(alloc.pendingClaims[:i], alloc.pendingClaims[i+1:]...)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-3
@@ -47,7 +47,7 @@ func (c *claim) Try(alloc *Allocator) bool {
|
|||||||
// If our ring doesn't know, it must be empty.
|
// If our ring doesn't know, it must be empty.
|
||||||
if c.noErrorOnUnknown {
|
if c.noErrorOnUnknown {
|
||||||
alloc.infof("Claim %s for %s: address allocator still initializing; will try later.", c.addr, c.ident)
|
alloc.infof("Claim %s for %s: address allocator still initializing; will try later.", c.addr, c.ident)
|
||||||
c.sendResult(nil) // don't make the caller wait
|
c.sendResult(nil)
|
||||||
} else {
|
} else {
|
||||||
c.sendResult(fmt.Errorf("%s is in the range %s, but the allocator is not initialized yet", c.addr, alloc.universe.AsCIDRString()))
|
c.sendResult(fmt.Errorf("%s is in the range %s, but the allocator is not initialized yet", c.addr, alloc.universe.AsCIDRString()))
|
||||||
}
|
}
|
||||||
@@ -60,7 +60,7 @@ func (c *claim) Try(alloc *Allocator) bool {
|
|||||||
alloc.infof("Claim %s for %s: %s; will try later.", c.addr, c.ident, err)
|
alloc.infof("Claim %s for %s: %s; will try later.", c.addr, c.ident, err)
|
||||||
c.sendResult(nil)
|
c.sendResult(nil)
|
||||||
} else { // just tell the user they can't do this.
|
} else { // just tell the user they can't do this.
|
||||||
c.DeniedBy(alloc, owner)
|
c.deniedBy(alloc, owner)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
@@ -86,7 +86,7 @@ func (c *claim) Try(alloc *Allocator) bool {
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *claim) DeniedBy(alloc *Allocator, owner router.PeerName) {
|
func (c *claim) deniedBy(alloc *Allocator, owner router.PeerName) {
|
||||||
name, found := alloc.nicknames[owner]
|
name, found := alloc.nicknames[owner]
|
||||||
if found {
|
if found {
|
||||||
name = " (" + name + ")"
|
name = " (" + name + ")"
|
||||||
|
|||||||
Reference in new issue
Block a user