From 4478238ff673cdc9c5024dc8d989ba9b8d48f1a8 Mon Sep 17 00:00:00 2001 From: Diptanu Choudhury Date: Wed, 9 Mar 2016 12:25:30 -0800 Subject: [PATCH] Fixed an issue around parsing client max and min ports --- command/agent/agent.go | 4 ++-- command/agent/config.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/command/agent/agent.go b/command/agent/agent.go index 4a52fefe30c..f1f9ab07df3 100644 --- a/command/agent/agent.go +++ b/command/agent/agent.go @@ -199,8 +199,8 @@ func (a *Agent) clientConfig() (*clientconfig.Config, error) { } conf.MaxKillTimeout = dur } - conf.ClientMaxPort = a.config.Client.ClientMaxPort - conf.ClientMinPort = a.config.Client.ClientMinPort + conf.ClientMaxPort = uint(a.config.Client.ClientMaxPort) + conf.ClientMinPort = uint(a.config.Client.ClientMinPort) // Setup the node conf.Node = new(structs.Node) diff --git a/command/agent/config.go b/command/agent/config.go index acf3e9192cd..785b80b8ea9 100644 --- a/command/agent/config.go +++ b/command/agent/config.go @@ -162,11 +162,11 @@ type ClientConfig struct { // ClientMaxPort is the upper range of the ports that the client uses for // communicating with plugin subsystems - ClientMaxPort uint `hcl:"client_max_port"` + ClientMaxPort int `hcl:"client_max_port"` // ClientMinPort is the lower range of the ports that the client uses for // communicating with plugin subsystems - ClientMinPort uint `hcl:"client_min_port"` + ClientMinPort int `hcl:"client_min_port"` } // ServerConfig is configuration specific to the server mode