Исправлен баг в методе Server.handleConnection
Some checks failed
build / build (push) Has been cancelled

This commit is contained in:
Алексей Бадяев 2024-11-05 14:33:11 +07:00
parent ffbd6b14fa
commit c692b8881d
Signed by: alexey
GPG Key ID: 686FBC1363E4AFAE

View File

@ -145,11 +145,10 @@ func (s *Server) handleConnection(ctx context.Context, conn net.Conn) {
fields[log.FnError] = err.Error()
_ = s.logger.Warn("peekHTTP failed", fields)
} else if host != "" {
if !strings.Contains(host, ":") {
addr = host + addr[strings.Index(addr, ":"):]
} else {
addr = host
if strings.Contains(host, ":") {
host = host[:strings.Index(host, ":")]
}
addr = host + addr[strings.Index(addr, ":"):]
}
reader = reader_n3
}