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()
|
||||
_ = 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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user