Removes upper end of muxado handler.

This commit is contained in:
James Phillips 2016-08-09 18:16:41 -07:00
parent 97a25e8564
commit d11a7a197c
No known key found for this signature in database
GPG Key ID: 77183E682AC5FC11
1 changed files with 1 additions and 22 deletions

View File

@ -17,7 +17,6 @@ import (
"github.com/hashicorp/memberlist"
"github.com/hashicorp/net-rpc-msgpackrpc"
"github.com/hashicorp/yamux"
"github.com/inconshreveable/muxado"
)
type RPCType byte
@ -25,7 +24,7 @@ type RPCType byte
const (
rpcConsul RPCType = iota
rpcRaft
rpcMultiplex
rpcMultiplex // Old Muxado byte, no longer supported.
rpcTLS
rpcMultiplexV2
)
@ -108,9 +107,6 @@ func (s *Server) handleConn(conn net.Conn, isTLS bool) {
metrics.IncrCounter([]string{"consul", "rpc", "raft_handoff"}, 1)
s.raftLayer.Handoff(conn)
case rpcMultiplex:
s.handleMultiplex(conn)
case rpcTLS:
if s.rpcTLS == nil {
s.logger.Printf("[WARN] consul.rpc: TLS connection attempted, server not configured for TLS %s", logConn(conn))
@ -130,23 +126,6 @@ func (s *Server) handleConn(conn net.Conn, isTLS bool) {
}
}
// handleMultiplex is used to multiplex a single incoming connection
// using the Muxado multiplexer
func (s *Server) handleMultiplex(conn net.Conn) {
defer conn.Close()
server := muxado.Server(conn)
for {
sub, err := server.Accept()
if err != nil {
if !strings.Contains(err.Error(), "closed") {
s.logger.Printf("[ERR] consul.rpc: multiplex conn accept failed: %v %s", err, logConn(conn))
}
return
}
go s.handleConsulConn(sub)
}
}
// handleMultiplexV2 is used to multiplex a single incoming connection
// using the Yamux multiplexer
func (s *Server) handleMultiplexV2(conn net.Conn) {