mirror of
https://github.com/status-im/consul.git
synced 2025-01-24 12:40:17 +00:00
Closes the conn on bad protocol version.
This commit is contained in:
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…
x
Reference in New Issue
Block a user