forked from ms/transocks
Исправлен баг в методе Server.handleConnection
Some checks failed
build / build (push) Has been cancelled
Some checks failed
build / build (push) Has been cancelled
This commit is contained in:
parent
ffbd6b14fa
commit
c692b8881d
@ -145,11 +145,10 @@ func (s *Server) handleConnection(ctx context.Context, conn net.Conn) {
|
|||||||
fields[log.FnError] = err.Error()
|
fields[log.FnError] = err.Error()
|
||||||
_ = s.logger.Warn("peekHTTP failed", fields)
|
_ = s.logger.Warn("peekHTTP failed", fields)
|
||||||
} else if host != "" {
|
} else if host != "" {
|
||||||
if !strings.Contains(host, ":") {
|
if strings.Contains(host, ":") {
|
||||||
addr = host + addr[strings.Index(addr, ":"):]
|
host = host[:strings.Index(host, ":")]
|
||||||
} else {
|
|
||||||
addr = host
|
|
||||||
}
|
}
|
||||||
|
addr = host + addr[strings.Index(addr, ":"):]
|
||||||
}
|
}
|
||||||
reader = reader_n3
|
reader = reader_n3
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user