From e5d5d42b136be084cb7f5a13034951706ebbf145 Mon Sep 17 00:00:00 2001 From: Chris Bednarski Date: Thu, 19 Nov 2015 22:18:19 -0800 Subject: [PATCH] Added nil to network.MapLabelToValues call --- client/consul.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/client/consul.go b/client/consul.go index b5759223a..bd058a0a3 100644 --- a/client/consul.go +++ b/client/consul.go @@ -2,13 +2,14 @@ package client import ( "fmt" - consul "github.com/hashicorp/consul/api" - "github.com/hashicorp/go-multierror" - "github.com/hashicorp/nomad/nomad/structs" "log" "net/url" "sync" "time" + + consul "github.com/hashicorp/consul/api" + "github.com/hashicorp/go-multierror" + "github.com/hashicorp/nomad/nomad/structs" ) const ( @@ -95,7 +96,7 @@ func (c *ConsulClient) ShutDown() { func (c *ConsulClient) findPortAndHostForLabel(portLabel string, task *structs.Task) (string, int) { for _, network := range task.Resources.Networks { - if p, ok := network.MapLabelToValues()[portLabel]; ok { + if p, ok := network.MapLabelToValues(nil)[portLabel]; ok { return network.IP, p } }