diff --git a/agent/consul/segment_stub.go b/agent/consul/segment_stub.go index bcb515095..7b2ed6617 100644 --- a/agent/consul/segment_stub.go +++ b/agent/consul/segment_stub.go @@ -35,7 +35,7 @@ func (s *Server) setupSegmentRPC() (map[string]net.Listener, error) { // setupSegments returns an error if any segments are defined since the OSS // version of Consul doesn't support them. -func (s *Server) setupSegments(config *Config, port int) error { +func (s *Server) setupSegments(config *Config, port int, rpcListeners map[string]net.Listener) error { if len(config.Segments) > 0 { return structs.ErrSegmentsNotSupported } diff --git a/agent/consul/server.go b/agent/consul/server.go index dd9c8f3db..a9c55571a 100644 --- a/agent/consul/server.go +++ b/agent/consul/server.go @@ -381,7 +381,7 @@ func NewServerLogger(config *Config, logger *log.Logger, tokens *token.Store) (* // Initialize the LAN segments before the default LAN Serf so we have // updated port information to publish there. - if err := s.setupSegments(config, serfBindPortWAN); err != nil { + if err := s.setupSegments(config, serfBindPortWAN, segmentListeners); err != nil { s.Shutdown() return nil, fmt.Errorf("Failed to setup network segments: %v", err) }