mirror of https://github.com/hashicorp/consul
Closes the conn on bad protocol version.
parent
a984a6703c
commit
406efb5d91
|
@ -282,6 +282,7 @@ func (p *ConnPool) getNewConn(dc string, addr net.Addr, version int) (*Conn, err
|
||||||
// Switch the multiplexing based on version
|
// Switch the multiplexing based on version
|
||||||
var session muxSession
|
var session muxSession
|
||||||
if version < 2 {
|
if version < 2 {
|
||||||
|
conn.Close()
|
||||||
return nil, fmt.Errorf("cannot make client connection, unsupported protocol version %d", version)
|
return nil, fmt.Errorf("cannot make client connection, unsupported protocol version %d", version)
|
||||||
} else {
|
} else {
|
||||||
// Write the Consul multiplex byte to set the mode
|
// Write the Consul multiplex byte to set the mode
|
||||||
|
|
Loading…
Reference in New Issue