chore: Remove unnecessary if in httpupgrade (#3413)

This commit is contained in:
AsenHu 2024-06-04 00:13:46 +08:00 committed by GitHub
parent 075051a693
commit 459504300c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -78,12 +78,8 @@ func (s *server) Handle(conn net.Conn) (stat.Connection, error) {
Port: int(0),
}
}
if remoteAddr == nil {
return nil, newError("remoteAddr is nil")
}
conn = newConnection(conn, remoteAddr)
return stat.Connection(conn), nil
return stat.Connection(newConnection(conn, remoteAddr)), nil
}
func (s *server) keepAccepting() {