remove some commented-out (dead) code

There are much more places, removed only few of them
to make review simpler (we can remove more later).

Found using https://go-critic.github.io/overview#commentedOutCode-ref
This commit is contained in:
Iskander Sharipov
2018-09-13 21:04:07 +03:00
parent 900b975c6a
commit 6154d4173a
3 changed files with 0 additions and 4 deletions

View File

@ -230,7 +230,6 @@ func (s *ServerChannel) ListenKCP(config kcpcfg.KCPConfigArgs, fn func(conn net.
}
}()
for {
//var conn net.Conn
conn, err := lis.AcceptKCP()
if err == nil {
go func() {

View File

@ -216,7 +216,6 @@ func (s *MuxBridge) handler(inConn net.Conn) {
v.(*smux.Session).Close()
}
group.Set(index, session)
// s.clientControlConns.Set(key, session)
go func() {
defer func() {
if e := recover(); e != nil {

View File

@ -363,7 +363,6 @@ func (s *SPS) OutToTCP(inConn *net.Conn) (lbAddr string, err error) {
request.HTTPSReply()
//s.log.Printf("https reply: %s", request.Host)
} else {
//forwardBytes = bytes.TrimRight(request.HeadBuf,"\r\n")
forwardBytes = request.HeadBuf
}
address = request.Host
@ -412,7 +411,6 @@ func (s *SPS) OutToTCP(inConn *net.Conn) (lbAddr string, err error) {
selectAddr = address
}
lbAddr = s.lb.Select(selectAddr, *s.cfg.LoadBalanceOnlyHA)
//lbAddr = s.lb.Select((*inConn).RemoteAddr().String())
outConn, err = s.GetParentConn(lbAddr)
if err != nil {
s.log.Printf("connect to %s , err:%s", lbAddr, err)