mirror of
https://github.com/status-im/consul.git
synced 2025-01-24 04:31:12 +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
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user