From c434345960be88e2bd7913e08c1aff34833122a0 Mon Sep 17 00:00:00 2001 From: Martynas Pumputis Date: Tue, 10 May 2016 15:24:38 +0100 Subject: [PATCH] Fix typo --- ipam/http.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ipam/http.go b/ipam/http.go index 6139546c..95bbbf84 100644 --- a/ipam/http.go +++ b/ipam/http.go @@ -38,7 +38,7 @@ func writeAddresses(w http.ResponseWriter, cidrs []address.CIDR) { } } -func hasBeenCanceled(dockerCli *docker.Client, closedChan <-chan bool, ident string, checkAlive bool) func() bool { +func hasBeenCancelled(dockerCli *docker.Client, closedChan <-chan bool, ident string, checkAlive bool) func() bool { return func() bool { select { case <-closedChan: @@ -62,7 +62,7 @@ func cancellationErr(w http.ResponseWriter, err error) bool { func (alloc *Allocator) handleHTTPAllocate(dockerCli *docker.Client, w http.ResponseWriter, ident string, checkAlive bool, subnet address.CIDR) { addr, err := alloc.Allocate(ident, subnet, checkAlive, - hasBeenCanceled(dockerCli, w.(http.CloseNotifier).CloseNotify(), ident, checkAlive)) + hasBeenCancelled(dockerCli, w.(http.CloseNotifier).CloseNotify(), ident, checkAlive)) if err != nil { if !cancellationErr(w, err) { badRequest(w, err) @@ -74,7 +74,7 @@ func (alloc *Allocator) handleHTTPAllocate(dockerCli *docker.Client, w http.Resp func (alloc *Allocator) handleHTTPClaim(dockerCli *docker.Client, w http.ResponseWriter, ident string, cidr address.CIDR, checkAlive, noErrorOnUnknown bool) { err := alloc.Claim(ident, cidr, checkAlive, noErrorOnUnknown, - hasBeenCanceled(dockerCli, w.(http.CloseNotifier).CloseNotify(), ident, checkAlive)) + hasBeenCancelled(dockerCli, w.(http.CloseNotifier).CloseNotify(), ident, checkAlive)) if err != nil { if !cancellationErr(w, err) { badRequest(w, fmt.Errorf("Unable to claim: %s", err))