From 406efb5d91ff4f70daab7ad24345a77707320329 Mon Sep 17 00:00:00 2001 From: James Phillips Date: Tue, 9 Aug 2016 18:13:53 -0700 Subject: [PATCH] Closes the conn on bad protocol version. --- consul/pool.go | 1 + 1 file changed, 1 insertion(+) diff --git a/consul/pool.go b/consul/pool.go index 4396540876..0906b28278 100644 --- a/consul/pool.go +++ b/consul/pool.go @@ -282,6 +282,7 @@ func (p *ConnPool) getNewConn(dc string, addr net.Addr, version int) (*Conn, err // Switch the multiplexing based on version var session muxSession if version < 2 { + conn.Close() return nil, fmt.Errorf("cannot make client connection, unsupported protocol version %d", version) } else { // Write the Consul multiplex byte to set the mode