Detect cancelled allocation more cleanly

to avoid the weave script trying to parse an error message as a CIDR
This commit is contained in:
Bryan Boreham committed 2015-09-16 14:14:40 +01:00
1 parent 1beaf79e47
commit 98b80c59d9
5 files changed
+26 -4

No files matched your search

+1 -1
View File
@@ -59,7 +59,7 @@ func (g *allocate) Try(alloc *Allocator) bool {
}
func (g *allocate) Cancel() {
g.resultChan <- allocateResult{0, fmt.Errorf("Allocate request for %s cancelled", g.ident)}
g.resultChan <- allocateResult{0, &errorCancelled{"Allocate", g.ident}}
}
func (g *allocate) ForContainer(ident string) bool {